Skip to content
Snippets Groups Projects
Commit 572481e5 authored by Jens Nolte's avatar Jens Nolte
Browse files

Add missing fork variants

parent 87926448
No related branches found
No related tags found
No related merge requests found
Pipeline #2807 passed
......@@ -2,6 +2,8 @@ module Quasar.Async.Fork (
-- * Forking with an asynchronous exception channel
-- ** IO
fork,
fork_,
forkWithUnmask,
forkWithUnmask_,
forkFuture,
......@@ -53,6 +55,12 @@ forkAsyncWithUnmaskSTM fn worker exChan = join <$> startShortIOSTM (unsafeShortI
-- * Fork in IO, redirecting errors to an ExceptionSink
fork :: IO () -> ExceptionSink -> IO ThreadId
fork fn exSink = forkWithUnmask ($ fn) exSink
fork_ :: IO () -> ExceptionSink -> IO ()
fork_ fn exSink = void $ fork fn exSink
forkWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> ExceptionSink -> IO ThreadId
forkWithUnmask fn exChan = mask_ $ forkIOWithUnmask wrappedFn
where
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment