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