Commit 19a40cd3 authored by Simon Marlow's avatar Simon Marlow

add test for #1067

parent abeb3ffe
......@@ -145,3 +145,5 @@ test('conc060', normal, compile_and_run, ['-package stm'])
test('conc061', normal, compile_and_run, ['-package stm'])
test('conc062', normal, compile_and_run, ['-package stm'])
test('conc063', exit_code(1), compile_and_run, ['-package stm'])
test('conc064', normal, compile_and_run, [''])
-- test for bug #1067
import Control.Concurrent
import Control.Exception
main = do
master <- myThreadId
test master 10
test tid 0 = return ()
test tid n = handle (const (test tid (n-1))) $ do
sequence $ replicate 3 $
forkIO $ do t <- myThreadId
--putStrLn ("Start " ++ show t)
threadDelay one_second
--putStrLn ("End " ++ show t)
throwTo tid NonTermination
--putStrLn ("Thrown " ++ show t)
threadDelay (10 * one_second)
one_second :: Int
one_second = 100000
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment