Proposal: Add Control.Exception.allowInterrupt
shelarcy
shelarcy at gmail.com
Sat Jan 8 23:03:35 CET 2011
+1
On Wed, 22 Dec 2010 19:37:55 +0900, Simon Marlow <marlowsd at gmail.com> wrote:
> Ticket:
>
> http://hackage.haskell.org/trac/ghc/ticket/4857
>
> 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
> http://hackage.haskell.org/trac/ghc/ticket/3837.
>
> Discussion period: 3 weeks (until 12 Jan 2011)
--
shelarcy <shelarcy hotmail.co.jp>
http://page.freett.com/shelarcy/
More information about the Libraries
mailing list