diff options
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc019.hs')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc019.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc019.hs b/testsuite/tests/concurrent/should_run/conc019.hs new file mode 100644 index 0000000000..51b3d7563a --- /dev/null +++ b/testsuite/tests/concurrent/should_run/conc019.hs @@ -0,0 +1,14 @@ +import Control.Concurrent +import Control.Exception +import Data.List +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 |