Are FFI calls interruptible?

Simon Marlow marlowsd at gmail.com
Wed May 4 11:38:56 CEST 2011


On 24/04/2011 21:16, Edward Z. Yang wrote:
> Excerpts from Bas van Dijk's message of Sun Apr 24 16:10:46 -0400 2011:
>> Well the whole block of code is under a mask_ so if FFI calls are not
>> interruptible the queued up exceptions should not be fired.
>
> Ah, I didn't know that.  I think it would be extremely surprising
> for users if FFI calls ever grew the semanticcs that they unmasked
> exceptions, so I don't think you have to worry too much about it.
>
> This also makes me wonder if "interruptible" in the sense that we're
> using it for FFI coincides with the sense of "interruptible" as used
> by mask.  I suspect it might not (that is, a mask will still prevent
> interruptible FFI calls from receiving interrupts.)  I will have to
> investigate this.

I think they should coincide.  That is, if you declare a foreign import 
to be interruptible, then it can be interrupted inside `mask` but not 
`uninterruptibleMask`.  Indeed, that is the semantics we implemented (I 
just checked the code).

Cheers,
	Simon





More information about the Glasgow-haskell-users mailing list