summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent/should_run/4813.hs
blob: db3a9778c61495a1ff9e46dc0cb00b8dbbc195d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import Control.Concurrent
import Control.Monad
import Control.Exception
import System.Mem

-- caused an assertion failure with -debug in 7.0.1 (#4813)

main = do
   m <- newEmptyMVar
   ts <- replicateM 100 $ mask_ $ forkIO $ threadDelay 100000; putMVar m ()
   mapM_ killThread (reverse (init ts))
   takeMVar m