From e4a135de27a999fe0ede5ac47a6cc34964157823 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 16 Oct 2008 10:04:10 +0000 Subject: [PATCH] docs about how exceptions are handled by forkIO'd threads (#2651) --- GHC/Conc.lhs | 5 +++++ 1 file changed, 5 insertions(+) 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 -> -- 1.7.10.4