From 786cf63de4522fa6b8090f85f3d0a64adff542c5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 17 Mar 2000 10:25:16 +0000 Subject: [PATCH] [project @ 2000-03-17 10:25:16 by simonmar] Add test for interruptible ops. --- ghc/tests/concurrent/should_run/conc020.hs | 10 ++++++++++ ghc/tests/concurrent/should_run/conc020.stderr | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 ghc/tests/concurrent/should_run/conc020.hs create mode 100644 ghc/tests/concurrent/should_run/conc020.stderr diff --git a/ghc/tests/concurrent/should_run/conc020.hs b/ghc/tests/concurrent/should_run/conc020.hs new file mode 100644 index 0000000..7a3774a --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc020.hs @@ -0,0 +1,10 @@ +import Concurrent +import Exception + +main = do + m <- newEmptyMVar + t <- forkIO (blockAsyncExceptions $ takeMVar m) + threadDelay 100000 + raiseInThread t (ErrorCall "I'm Interruptible") + threadDelay 100000 + putMVar m () -- to avoid t being garbage collected diff --git a/ghc/tests/concurrent/should_run/conc020.stderr b/ghc/tests/concurrent/should_run/conc020.stderr new file mode 100644 index 0000000..be1a6af --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc020.stderr @@ -0,0 +1,2 @@ + +Fail: I'm Interruptible -- 1.7.10.4