From 2420c55ef021e3fb3877bcd3666376ef89fcde44 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 10 Nov 2000 09:51:45 +0000 Subject: [PATCH] [project @ 2000-11-10 09:51:45 by simonmar] Add test illustrating the BlockedOnDeadMVar exception. --- ghc/tests/concurrent/should_run/conc024.hs | 14 ++++++++++++++ ghc/tests/concurrent/should_run/conc024.stdout | 1 + 2 files changed, 15 insertions(+) create mode 100644 ghc/tests/concurrent/should_run/conc024.hs create mode 100644 ghc/tests/concurrent/should_run/conc024.stdout diff --git a/ghc/tests/concurrent/should_run/conc024.hs b/ghc/tests/concurrent/should_run/conc024.hs new file mode 100644 index 0000000..0daed7e --- /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 0000000..fc393ed --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc024.stdout @@ -0,0 +1 @@ +thread blocked indefinitely -- 1.7.10.4