summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent/should_run/conc027.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc027.hs')
-rw-r--r--testsuite/tests/concurrent/should_run/conc027.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc027.hs b/testsuite/tests/concurrent/should_run/conc027.hs
new file mode 100644
index 0000000000..4a04211824
--- /dev/null
+++ b/testsuite/tests/concurrent/should_run/conc027.hs
@@ -0,0 +1,9 @@
+
+import Control.Concurrent
+
+main = do
+ m <- newEmptyMVar
+ end <- newEmptyMVar
+ forkIO (sequence_ [ putMVar m () | _ <- [1 .. 10000] ])
+ forkIO (sequence_ [ takeMVar m | _ <- [1 .. 10000] ] >> putMVar end ())
+ takeMVar end