Opened 4 years ago

Closed 2 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:

Description

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 4 years ago.
Add forkOSWithUnmask

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by joeyadams

Add forkOSWithUnmask

comment:1 Changed 4 years ago by igloo

difficulty: Unknown

Was this agreed on the libraries list? Please see http://www.haskell.org/haskellwiki/Library_submissions for details.

comment:3 Changed 4 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 3 years ago by thoughtpolice

Cc: ekmett added
Milestone: 7.10.1
Status: newpatch

comment:5 Changed 3 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 3 years ago by thoughtpolice (previous) (diff)

comment:6 Changed 3 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 3 years ago by thoughtpolice

Component: libraries/baseCore Libraries

Moving over to new owning component 'Core Libraries'.

comment:8 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.12.1

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 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:10 Changed 2 years ago by thomie

Status: infoneededpatch

comment:11 Changed 2 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.

  [1] http://thread.gmane.org/gmane.comp.lang.haskell.libraries/22709

Signed-off-by: Austin Seipp <austin@well-typed.com>

comment:12 Changed 2 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.