diff options
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc020.hs')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc020.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc020.hs b/testsuite/tests/concurrent/should_run/conc020.hs new file mode 100644 index 0000000000..956b761245 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/conc020.hs @@ -0,0 +1,10 @@ +import Control.Concurrent +import Control.Exception + +main = do + m <- newEmptyMVar + t <- forkIO (block $ takeMVar m) + threadDelay 100000 + throwTo t (ErrorCall "I'm Interruptible") + threadDelay 100000 + putMVar m () -- to avoid t being garbage collected |