[GHC] #8010: Add forkOSUnmasked (patch)
GHC
ghc-devs at haskell.org
Sat Jun 22 07:20:46 CEST 2013
#8010: Add forkOSUnmasked (patch)
-----------------------------+----------------------------------------------
Reporter: joeyadams | Owner:
Type: feature request | Status: new
Priority: normal | Component: libraries/base
Version: 7.7 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
This patch simply adds `forkOSUnmasked` to Control.Concurrent:
{{{
-- | Like 'forkIOWithUnmask', but the child thread is a bound thread,
-- as with 'forkOS'.
forkOSWithUnmask :: ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
forkOSWithUnmask io = forkOS (io unsafeUnmask)
}}}
I ran `sh validate`, and no new failures were introduced. I'll push it to
master in a few days, unless someone objects.
For GHC < 7.8, `forkOSWithUnmask` can be achieved using `forkOS` and
[http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc/html
/Control-Exception.html#v:block block], but `block` is removed in GHC 7.8.
`unsafeUnmask` can still be imported from `GHC.IO`, however.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/8010>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list