Interruptible foreign calls, part 2

David Feuer david.feuer at
Mon Jan 4 07:12:22 UTC 2021

Whoops, I meant `interruptible yield`. Sorry for the confusion.

On Mon, Jan 4, 2021, 1:22 AM David Feuer <david.feuer at> wrote:

> Another issue is that (as the recently expanded documentation shows),
> an `interruptible` foreign call is not actually an "interruptible
> operation" in the sense used in Control.Exception. To make it so, the
> caller has to manually call `allowInterrupt`. Or, in the
> single-threaded runtime, has to call `interruptibleYield`. So ... they
> have to make a foreign call to `rts_isThreaded` and then use the
> result to figure out how to deliver a potential exception. What a
> terrible user experience! Why not bake the "deliver exceptions" part
> into the FFI code for `interruptible` calls? This stuff has been
> documented so very recently (not in any released GHC) that I don't
> imagine much will break if we make these changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list