blob: 956b7612452b58be9aded4318ed0ea6c6718714f (
plain)
1
2
3
4
5
6
7
8
9
10
|
import Control.Concurrent
import Control.Exception
main = do
m <- newEmptyMVar
t <- forkIO (block $ takeMVar m)
threadDelay 100000
throwTo t (ErrorCall "I'm Interruptible")
threadDelay 100000
putMVar m () -- to avoid t being garbage collected
|