fork package:concurrency
Fork a computation to happen concurrently. Communication may happen
over MVars.
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.
Like
fork, but the thread is given a name which may be used to
present more useful debugging information.
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.
Like
forkOS, but the thread is given a name which may be used
to present more useful debugging information.
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 ""
Like
forkOSWithUnmask, but the thread is given a name which may
be used to present more useful debugging information.
forkOSWithUnmaskN _ = forkOSWithUnmask
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.
Like
forkOn, but the thread is given a name which may be used
to present more useful debugging information.
Like
forkWithUnmask, but the child thread is pinned to the
given CPU, as with
forkOn.
forkOnWithUnmask = forkOnWithUnmaskN ""
Like
forkWithUnmaskN, but the child thread is pinned to the
given CPU, as with
forkOn.
forkOnWithUnmaskN _ = forkOnWithUnmask
Like
fork, 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.
forkWithUnmask = forkWithUnmaskN ""
Like
forkWithUnmask, but the thread is given a name which may
be used to present more useful debugging information.
forkWithUnmaskN _ = forkWithUnmask
Given a function to remove the transformer-specific state, lift a
fork(on)WithUnmask invocation.