blob: 9804657aabe3cdc3d356e21aefb8bfb442270d3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import Control.Concurrent
import Control.Exception
import System.Mem
-- !!! test that a child thread waiting on its own MVar will get killed by
-- a signal.
main = do
forkIO (Control.Exception.catch (do { m <- newEmptyMVar; takeMVar m })
$ \e -> putStrLn ("caught: " ++ show (e::SomeException)))
threadDelay 10000
System.Mem.performGC
threadDelay 10000
|