SIGALRM, SIGVTALRM, and third party libraries

Simon Marlow marlowsd at
Mon Sep 6 05:57:59 EDT 2010

On 03/09/2010 22:13, Edward Z. Yang wrote:
> Excerpts from Bryan O'Sullivan's message of Fri Sep 03 17:00:03 -0400 2010:
>> What I am wondering is if there's a practical downside to doing this. Am I
>> going to accidentally kill something? This is a very important gap in the
>> usability of GHC with native libraries, and if this approach actually turns
>> out to be safe in practice, that would be wonderful.
> I think the primary downside is that it's not portable (yet) to Windows.  Simon
> Marlow and I have been working on "interruptible FFI calls", and one of the
> things that needs to be addressed along the way is that the RTS should publish
> "portable" equivalents of the pthread functions which are blessed for foreign
> libraries to use for this purpose.  Maybe we should emulate threading functionality
> at the pthreads layer?

I don't think there's a problem here.  Windows doesn't have EINTR, so 
foreign libraries aren't affected by our timer signals.

What did you have in mind with respect to "portable equivalents of 
pthread functions"?  I'm not sure we need to do anything along these 
lines at all, and I'd much rather we didn't enforce any threading 
abstraction on foreign clients.


More information about the Glasgow-haskell-users mailing list