[project @ 2000-03-17 10:25:16 by simonmar]
authorsimonmar <unknown>
Fri, 17 Mar 2000 10:25:16 +0000 (10:25 +0000)
committersimonmar <unknown>
Fri, 17 Mar 2000 10:25:16 +0000 (10:25 +0000)
Add test for interruptible ops.

ghc/tests/concurrent/should_run/conc020.hs [new file with mode: 0644]
ghc/tests/concurrent/should_run/conc020.stderr [new file with mode: 0644]

diff --git a/ghc/tests/concurrent/should_run/conc020.hs b/ghc/tests/concurrent/should_run/conc020.hs
new file mode 100644 (file)
index 0000000..7a3774a
--- /dev/null
@@ -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 (file)
index 0000000..be1a6af
--- /dev/null
@@ -0,0 +1,2 @@
+
+Fail: I'm Interruptible