diff options
author | simonmar <unknown> | 2000-11-10 09:51:45 +0000 |
---|---|---|
committer | simonmar <unknown> | 2000-11-10 09:51:45 +0000 |
commit | 2420c55ef021e3fb3877bcd3666376ef89fcde44 (patch) | |
tree | 11728ba73c2e802cc81416b42f8e7cf5ab78b9a9 | |
parent | d4e2c3a1d02169cdbd71577a3189d94a158e806b (diff) | |
download | haskell-2420c55ef021e3fb3877bcd3666376ef89fcde44.tar.gz |
[project @ 2000-11-10 09:51:45 by simonmar]
Add test illustrating the BlockedOnDeadMVar exception.
-rw-r--r-- | ghc/tests/concurrent/should_run/conc024.hs | 14 | ||||
-rw-r--r-- | ghc/tests/concurrent/should_run/conc024.stdout | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ghc/tests/concurrent/should_run/conc024.hs b/ghc/tests/concurrent/should_run/conc024.hs new file mode 100644 index 0000000000..0daed7e7aa --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc024.hs @@ -0,0 +1,14 @@ +module Main where + +import Exception +import Concurrent +import Prelude hiding (catch) + +-- illustrates the BlockOnDeadMVar exception + +main = do + id <- myThreadId + forkIO (catchAllIO (do m <- newEmptyMVar; takeMVar m) + (\e -> raiseInThread id e)) + catchAllIO (print (sum [1..1000000])) + (\e -> print e) diff --git a/ghc/tests/concurrent/should_run/conc024.stdout b/ghc/tests/concurrent/should_run/conc024.stdout new file mode 100644 index 0000000000..fc393ed0a4 --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc024.stdout @@ -0,0 +1 @@ +thread blocked indefinitely |