From: Simon Marlow Date: Thu, 16 Oct 2008 10:04:10 +0000 (+0000) Subject: docs about how exceptions are handled by forkIO'd threads (#2651) X-Git-Tag: 2009-06-25~103 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e4a135de27a999fe0ede5ac47a6cc34964157823;p=ghc-base.git docs about how exceptions are handled by forkIO'd threads (#2651) --- diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index 0c87603..96e00e0 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -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 ->