diff options
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc067.hs')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc067.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc067.hs b/testsuite/tests/concurrent/should_run/conc067.hs new file mode 100644 index 0000000000..ef6dde3ff7 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/conc067.hs @@ -0,0 +1,16 @@ +-- Test for bug #418 + +module Main where + +import Control.Concurrent +import System.IO.Unsafe (unsafeInterleaveIO) + +main = do + v <- newEmptyMVar + a <- unsafeInterleaveIO (readMVar v) + t <- forkIO (print a) + threadDelay (100*1000) + killThread t + forkIO $ print a + putMVar v () + |