4 -- check that async exceptions are restored to their previous
5 -- state after an exception is raised and handled.
8 main_thread <- myThreadId
14 raiseInThread main_thread (ErrorCall "foo")
16 raiseInThread main_thread (ErrorCall "bar")
20 blockAsyncExceptions (do
22 unblockAsyncExceptions (
23 -- unblocked, "foo" delivered to "caught1"
26 ) `catchAllIO` (\e -> putStrLn ("caught1: " ++ show e))
28 -- blocked here, "bar" can't be delivered
30 `catchAllIO` (\e -> putStrLn ("caught2: " ++ show e))
32 -- unblocked here, "bar" delivered to "caught3"
35 `catchAllIO` (\e -> putStrLn ("caught3: " ++ show e))