streamly-core-0.2.2: Streaming, parsers, arrays, serialization and more
Copyright(c) 2017 Composewell Technologies
LicenseBSD-3-Clause
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Streamly.Internal.Control.ForkIO

Description

 
Synopsis

Documentation

rawForkIO :: IO () -> IO ThreadId Source #

Stolen from the async package. The perf improvement is modest, 2% on a thread heavy benchmark (parallel composition using noop computations). A version of forkIO that does not include the outer exception handler: saves a bit of time when we will be installing our own exception handler.

forkIOManaged :: IO () -> IO ThreadId Source #

Fork a thread that is automatically killed as soon as the reference to the returned threadId is garbage collected.

forkManagedWith :: MonadIO m => (m () -> m ThreadId) -> m () -> m ThreadId Source #

Fork a thread that is automatically killed as soon as the reference to the returned threadId is garbage collected.