Skip to content

Add forkOSUnmasked (patch)

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 block, but block is removed in GHC 7.8. unsafeUnmask can still be imported from GHC.IO, however.

Trac metadata
Trac field Value
Version 7.7
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information