Opened 7 years ago

Closed 4 years ago

#8010 closed feature request (fixed)

Add forkOSUnmasked (patch)

Reported by: joeyadams Owned by:
Priority: normal Milestone: 8.0.1
Component: Core Libraries Version: 7.7
Keywords: Cc: hvr, ekmett
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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.

Attachments (1)

0001-Add-forkOSWithUnmask.patch (1.8 KB) - added by joeyadams 7 years ago.
Add forkOSWithUnmask

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by joeyadams

Add forkOSWithUnmask

comment:1 Changed 7 years ago by igloo

difficulty: Unknown

Was this agreed on the libraries list? Please see for details.

comment:3 Changed 6 years ago by hvr

Cc: hvr added

for some reason that proposal went totally ignored (maybe it was just posted with bad timing?)

comment:4 Changed 6 years ago by thoughtpolice

Cc: ekmett added
Milestone: 7.10.1
Status: newpatch

comment:5 Changed 5 years ago by thoughtpolice

Status: patchinfoneeded

I think we should re-post this to the list IMO if it saw no review. Would hvr/ekmett like to do this?

Last edited 5 years ago by thoughtpolice (previous) (diff)

comment:6 Changed 5 years ago by hvr

Proposal has passed with a little support and no resistance, so I guess we're good to go?

comment:7 Changed 5 years ago by thoughtpolice

Component: libraries/baseCore Libraries

Moving over to new owning component 'Core Libraries'.

comment:8 Changed 5 years ago by thoughtpolice


Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:9 Changed 4 years ago by thoughtpolice


Milestone renamed

comment:10 Changed 4 years ago by thomie

Status: infoneededpatch

comment:11 Changed 4 years ago by Austin Seipp <austin@…>

In dec5cd4/ghc:

base: Add forkOSWithUnmask

Fixes #8010, according to the specified libraries proposal. [1]

Also, some minor wordsmithing.


Signed-off-by: Austin Seipp <>

comment:12 Changed 4 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged, thanks Joey, and sorry this took a ridiculously long time...

Note: See TracTickets for help on using tickets.