Commit aee7f7b1 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-01-22 14:30:16 by simonmar]

Add a multi-thread blackhole test (now gets a NonTermination exception
instead of a fatal "no threads to run" error).
parent 1c44d851
......@@ -44,3 +44,4 @@ test "conc030" { myvtr("", "+RTS -K2M -RTS", "") }
test "conc031" { myvtr("", "", "") }
test "conc032" { myvtr("", "", "") }
test "conc033" { myvtr("", "", "") }
test "conc034" { myvtr("", "+RTS -C0 -RTS", "") }
import Concurrent
import Exception
-- !!! Try to get two threads into a knot depending on each other.
-- This should result in the main thread being sent a NonTermination
-- exception (in GHC 5.02, the program is terminated with "no threads
-- to run" instead).
main = do
let a = sum [1..10000] + b
b = sum [2..10000] + a
forkIO (print a)
r <- Exception.try $ print b
print r
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