blob: 76b8d2f1e0c425a331304d9829240ff117f6e7b9 (
plain)
1
2
3
4
5
6
7
8
9
|
import Control.Exception
import GHC.Conc
main = do
t1 <- mask $ \_ -> forkIO yield
t2 <- forkIO $ killThread t1
threadDelay 100000
threadStatus t1 >>= print
threadStatus t2 >>= print
|