diff options
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc008.hs')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc008.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc008.hs b/testsuite/tests/concurrent/should_run/conc008.hs new file mode 100644 index 0000000000..66a4b5f973 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/conc008.hs @@ -0,0 +1,12 @@ + +module Main where + +import Control.Concurrent +import Control.Exception + +-- Send ourselves a KillThread signal, catch it and recover. + +main = do + id <- myThreadId + Control.Exception.catch (killThread id) $ + \e -> putStr (show (e::SomeException)) |