[project @ 2000-03-17 10:01:29 by simonmar]
authorsimonmar <unknown>
Fri, 17 Mar 2000 10:01:29 +0000 (10:01 +0000)
committersimonmar <unknown>
Fri, 17 Mar 2000 10:01:29 +0000 (10:01 +0000)
Add test for garbage collecting threads.

ghc/tests/concurrent/should_run/conc019.hs [new file with mode: 0644]
ghc/tests/concurrent/should_run/conc019.stdout [new file with mode: 0644]

diff --git a/ghc/tests/concurrent/should_run/conc019.hs b/ghc/tests/concurrent/should_run/conc019.hs
new file mode 100644 (file)
index 0000000..722cf03
--- /dev/null
@@ -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 (file)
index 0000000..afc24a6
--- /dev/null
@@ -0,0 +1,2 @@
+caught: thread blocked indefinitely
+50005000