Opened 8 years ago

Last modified 8 years ago

#4857 closed proposal

Add Control.Exception.allowInterrupt — at Version 1

Reported by: simonmar Owned by:
Priority: normal Milestone: Not GHC
Component: libraries/base Version: 7.0.1
Keywords: Cc: mmitar@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by simonmar)

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 ()

Some discussion leading up to this can be found in #3837.

Discussion period: 3 weeks (until 12 Jan 2011)

Change History (1)

comment:1 Changed 8 years ago by simonmar

Description: modified (diff)
Note: See TracTickets for help on using tickets.