docs about how exceptions are handled by forkIO'd threads (#2651)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 16 Oct 2008 10:04:10 +0000 (10:04 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 16 Oct 2008 10:04:10 +0000 (10:04 +0000)
GHC/Conc.lhs

index 0c87603..96e00e0 100644 (file)
@@ -204,6 +204,11 @@ 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').
 -}
 forkIO :: IO () -> IO ThreadId
 forkIO action = IO $ \ s ->