Copyright | (c) 2017 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- doFork :: MonadRunInIO m => m () -> RunInIO m -> (SomeException -> IO ()) -> m ThreadId
- fork :: MonadRunInIO m => m () -> m ThreadId
- forkManaged :: MonadRunInIO m => m () -> m ThreadId
Documentation
doFork :: MonadRunInIO m => m () -> RunInIO m -> (SomeException -> IO ()) -> m ThreadId Source #
Fork a thread to run the given computation, installing the provided exception handler. Lifted to any monad with 'MonadRunInIO m' capability.
TODO: the RunInIO argument can be removed, we can directly pass the action as "mrun action" instead.
fork :: MonadRunInIO m => m () -> m ThreadId Source #
fork
lifted to any monad with 'MonadBaseControl IO m' capability.
forkManaged :: MonadRunInIO m => m () -> m ThreadId Source #
Fork a thread that is automatically killed as soon as the reference to the returned threadId is garbage collected.