Interruptible GHC

Simon Marlow marlowsd at
Wed Sep 15 04:34:06 EDT 2010

On 15/09/2010 03:33, Edward Z. Yang wrote:
> Excerpts from Simon Marlow's message of Mon Sep 13 05:10:13 -0400 2010:
>> The idea of having user-definable cancellation mechanisms seems quite
>> sensible, given that we have so many ways to do this.  However it seems
>> quite hard in practice: for pthread_cancel, the RTS has to behave quite
>> differently from pthread_kill.  The API for defining the cancellation
>> mechanism could get quite complicated.
>> For now I would go with 'interruptible' (meaning either pthread_kill()
>> or CancelSynchronousIO()).  It's not nearly as dangerous as
>> pthread_cancel(), but it covers a lot of the cases we're interested in,
>> and it doesn't have problems with bound threads.
> Sounds good.  I'll roll this change tomorrow.  Maybe we should emit a warning
> pre-Vista that "interruptible" is not being honored?

It's not clear to me when to emit the warning: the system we're 
compiling on is not necessarily the one we're going to run on.  This is 
more often the case for us where we're building distributions, than for 
other people though.

> Also, it occurs
> to me that a lot of this functionality could be implemented in user
> space.

Maybe - feel free to propose something...


More information about the Glasgow-haskell-users mailing list