Sparks off 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 thread; if you want to use a foreign
library that uses thread-local storage, use Control.Concurrent.forkOS instead.
GHC note: the new thread inherits the blocked state of the parent
(see Control.Exception.block).
The newly created thread has an exception handler that discards the
exceptions BlockedOnDeadMVar, BlockedIndefinitely, and
ThreadKilled, and passes all other exceptions to the uncaught
exception handler (see setUncaughtExceptionHandler).
|