black hole detection and concurrency

Simon Marlow marlowsd at
Tue Jan 6 04:11:28 EST 2009

Ian Lynagh wrote:
> On Mon, Dec 29, 2008 at 05:07:22PM +0100, Bertram Felgenhauer wrote:
>> Simon Peyton-Jones wrote:
>>> This is odd (to me).  The "permanently bound" stuff applies only to
>>> *synchronous* exceptions, which thread-killing is not.  Simon M will
>>> have more to say when he gets back
>> This is true when the exception is raised the first time. However, some
>> exception handling functions like 'bracket' catch the exception, do
>> their cleanup, and then throw the exception again. This is done in
>> onException, and goes through throwIO and eventually raiseIO#. At this
>> point the originally asynchronous exception has become a synchronous
>> one.
> We don't currently have a way to know whether an exception was thrown
> asynchronously or not, right?
> Should we actually be throwing
>     data SomeExceptionSync = SomeExceptionSync Bool -- synchronous? 
>                                                SomeException
> with catch etc ignoring the Bool, but bracket etc handling it
> appropriately?

This ticket describes the problem and a possible solution:


More information about the Glasgow-haskell-users mailing list