Interruptible GHC

Edward Z. Yang ezyang at MIT.EDU
Wed Sep 15 16:42:30 EDT 2010

Excerpts from Simon Marlow's message of Wed Sep 15 04:34:06 -0400 2010:
> 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.

That's true; we'd only be able to test at runtime using GetProcAddress,
and we shouldn't really emit extra output unless specifically asked
for (maybe as an RTS option).  But, as you say, an appropriately phrased
compile time check might be useful.

> Maybe - feel free to propose something...

Essentially, you never throw exceptions at Haskell threads actually running
FFI calls; you through them at "management" threads that then take
appropriate action on the real thread.  In order to allow for unsafe
thread termination, there'd need to be a way to extra the true thread
identifier from the Haskell thread, but other mechanisms could just be
implemented with more FFI calls.


More information about the Glasgow-haskell-users mailing list