summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent/should_run/1980.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/concurrent/should_run/1980.hs')
-rw-r--r--testsuite/tests/concurrent/should_run/1980.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/1980.hs b/testsuite/tests/concurrent/should_run/1980.hs
new file mode 100644
index 0000000000..61fcd9d15b
--- /dev/null
+++ b/testsuite/tests/concurrent/should_run/1980.hs
@@ -0,0 +1,13 @@
+import Control.Exception
+import Control.Concurrent
+
+main = do
+ thr <- myThreadId
+ evaluate $ increase_stack 1000
+ throwTo thr ThreadKilled
+ `Control.Exception.catch` (\e -> case e of
+ ThreadKilled -> return ()
+ _ -> throw e)
+ where
+ increase_stack 0 = 1
+ increase_stack n = increase_stack (n-1) + n