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.