Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fork :: MonadConc m => m () -> m (ThreadId m)concurrency Control.Monad.Conc.Class Fork a computation to happen concurrently. Communication may happen over MVars.
forkFinally :: MonadConc m => m a -> (Either SomeException a -> m ()) -> m (ThreadId m)concurrency Control.Monad.Conc.Class Fork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked. This function is useful for informing the parent when a child terminates, for example.
forkN :: MonadConc m => String -> m () -> m (ThreadId m)concurrency Control.Monad.Conc.Class Like fork, but the thread is given a name which may be used to present more useful debugging information.
forkOS :: MonadConc m => m () -> m (ThreadId m)concurrency Control.Monad.Conc.Class Fork a computation to happen in a bound thread, which is necessary if you need to call foreign (non-Haskell) libraries that make use of thread-local state, such as OpenGL.
forkOSN :: MonadConc m => String -> m () -> m (ThreadId m)concurrency Control.Monad.Conc.Class Like forkOS, but the thread is given a name which may be used to present more useful debugging information.
forkOSWithUnmask :: MonadConc m => ((forall a . () => m a -> m a) -> m ()) -> m (ThreadId m)concurrency Control.Monad.Conc.Class Like forkOS, but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function should not be used within a mask or uninterruptibleMask.
forkOSWithUnmask = forkOSWithUnmaskN ""
-
concurrency Control.Monad.Conc.Class Like forkOSWithUnmask, but the thread is given a name which may be used to present more useful debugging information.
forkOSWithUnmaskN _ = forkOSWithUnmask
forkOn :: MonadConc m => Int -> m () -> m (ThreadId m)concurrency Control.Monad.Conc.Class Fork a computation to happen on a specific processor. The specified int is the capability number, typically capabilities correspond to physical processors or cores but this is implementation dependent. The int is interpreted modulo to the total number of capabilities as returned by getNumCapabilities.
forkOnN :: MonadConc m => String -> Int -> m () -> m (ThreadId m)concurrency Control.Monad.Conc.Class Like forkOn, but the thread is given a name which may be used to present more useful debugging information.
forkOnWithUnmask :: MonadConc m => Int -> ((forall a . () => m a -> m a) -> m ()) -> m (ThreadId m)concurrency Control.Monad.Conc.Class Like forkWithUnmask, but the child thread is pinned to the given CPU, as with forkOn.
forkOnWithUnmask = forkOnWithUnmaskN ""