forkIO

Creates a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread. The new thread will be a lightweight, unbound thread. Foreign calls made by this thread are not guaranteed to be made by any particular OS thread; if you need foreign calls to be made by a particular OS thread, then use forkOS instead. The new thread inherits the masked state of the parent (see mask). The newly created thread has an exception handler that discards the exceptions BlockedIndefinitelyOnMVar, BlockedIndefinitelyOnSTM, and ThreadKilled, and passes all other exceptions to the uncaught exception handler. WARNING: Exceptions in the new thread will not be rethrown in the thread that created it. This means that you might be completely unaware of the problem if/when this happens. You may want to use the async library instead.
Unlifted version of forkIO.
Creates a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread. The new thread will be a lightweight, unbound thread. Foreign calls made by this thread are not guaranteed to be made by any particular OS thread; if you need foreign calls to be made by a particular OS thread, then use forkOS instead. The new thread inherits the masked state of the parent (see mask). The newly created thread has an exception handler that discards the exceptions BlockedIndefinitelyOnMVar, BlockedIndefinitelyOnSTM, and ThreadKilled, and passes all other exceptions to the uncaught exception handler.
Lifted forkIO.
Like Control.Concurrent.forkIO but returns a computation that when executed blocks until the thread terminates then returns the final value of the thread.
Same as Control.Concurrent.Thread.forkIO but additionaly adds the thread to the group.
See forkIO.
Same as Control.Concurrent.Thread.Group.forkIO but waits there are less then the max size number of threads.
Spark off a new thread to run the monadic computation passed as the first argument, and return the ThreadId of the newly created thread. The new thread will run the computation using the same monadic context as the parent thread. As a convenience, this forkIO accepts a computation returning any value, not just unit. This value is discarded when the computation terminates.
Like forkIO, but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function is typically used in the following way
... mask_ $ forkIOWithUnmask $ \unmask ->
catch (unmask ...) handler
so that the exception handler in the child thread is established with asynchronous exceptions masked, meanwhile the main body of the child thread is executed in the unmasked state. Note that the unmask function passed to the child thread should only be used in that thread; the behaviour is undefined if it is invoked in a different thread.
Unlifted version of forkIOWithUnmask.
This was introduced in "base" some time after 7.0.4
Fork a thread that is automatically killed as soon as the reference to the returned threadId is garbage collected.
Like Control.Concurrent.forkIOWithUnmask but returns a computation that when executed blocks until the thread terminates then returns the final value of the thread.
Same as Control.Concurrent.Thread.forkIOWithUnmask but additionaly adds the thread to the group.
Same as Control.Concurrent.Thread.Group.forkIOWithUnmask but waits there are less then the max size number of threads.
Launch a new reference counted resource context using forkIO. This is defined as resourceForkWith forkIO. Note: Using regular forkIO inside of a ResourceT is inherently unsafe, since the forked thread may try access the resources of the parent after they are cleaned up. When you use resourceForkIO or resourceForkWith, ResourceT is made aware of the new thread, and will only cleanup resources when all threads finish. Other concurrency mechanisms, like concurrently or race, are safe to use. If you encounter InvalidAccess exceptions ("The mutable state is being accessed after cleanup"), use of forkIO is a possible culprit.
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.
Launch a new reference counted resource context using forkIO. This is defined as resourceForkWith forkIO.