blob: 66a4b5f973842333d9872ff8d9e0c33ceab4b356 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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))
|