Proposal: Add Control.Exception.allowInterrupt
shelarcy at gmail.com
Sat Jan 8 23:03:35 CET 2011
On Wed, 22 Dec 2010 19:37:55 +0900, Simon Marlow <marlowsd at gmail.com> wrote:
> This proposal is to add the following function to Control.Exception:
> -- | When invoked inside 'mask', this function allows a blocked
> -- asynchronous exception to be raised, if one exists. It is
> -- equivalent to performing an interruptible operation (see
> -- #interruptible#), but does not involve any actual blocking.
> -- When called outside 'mask', or inside 'uninterruptibleMask', this
> -- function has no effect.
> allowInterrupt :: IO ()
> allowInterrupt = unsafeUnmask $ return ()
> The above is almost the entire implementation modulo imports, so I
> didn't bother attaching a patch to the ticket. unsafeUnmask is not
> exported by Control.Exception, it is an internal function from GHC.IO.
> Some discussion leading up to this can be found in
> Discussion period: 3 weeks (until 12 Jan 2011)
shelarcy <shelarcy hotmail.co.jp>
More information about the Libraries