From bdad103c438898c1f90b6d1d4f0d9009f05a58ed Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 17 Mar 2000 10:01:29 +0000 Subject: [PATCH] [project @ 2000-03-17 10:01:29 by simonmar] Add test for garbage collecting threads. --- ghc/tests/concurrent/should_run/conc019.hs | 9 +++++++++ ghc/tests/concurrent/should_run/conc019.stdout | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 ghc/tests/concurrent/should_run/conc019.hs create mode 100644 ghc/tests/concurrent/should_run/conc019.stdout diff --git a/ghc/tests/concurrent/should_run/conc019.hs b/ghc/tests/concurrent/should_run/conc019.hs new file mode 100644 index 0000000..722cf03 --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc019.hs @@ -0,0 +1,9 @@ +import IO +import Concurrent +import Exception + +main = do + forkIO (catchAllIO (do { m <- newEmptyMVar; takeMVar m }) + (\e -> putStrLn ("caught: " ++ show e))) + let x = sum [1..10000] + x `seq` print x diff --git a/ghc/tests/concurrent/should_run/conc019.stdout b/ghc/tests/concurrent/should_run/conc019.stdout new file mode 100644 index 0000000..afc24a6 --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc019.stdout @@ -0,0 +1,2 @@ +caught: thread blocked indefinitely +50005000 -- 1.7.10.4