<div dir="auto">Whoops, I meant `interruptible yield`. Sorry for the confusion.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 4, 2021, 1:22 AM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another issue is that (as the recently expanded documentation shows),<br>
an `interruptible` foreign call is not actually an "interruptible<br>
operation" in the sense used in Control.Exception. To make it so, the<br>
caller has to manually call `allowInterrupt`. Or, in the<br>
single-threaded runtime, has to call `interruptibleYield`. So ... they<br>
have to make a foreign call to `rts_isThreaded` and then use the<br>
result to figure out how to deliver a potential exception. What a<br>
terrible user experience! Why not bake the "deliver exceptions" part<br>
into the FFI code for `interruptible` calls? This stuff has been<br>
documented so very recently (not in any released GHC) that I don't<br>
imagine much will break if we make these changes.<br>
</blockquote></div>