
8 Dec
2006
8 Dec
'06
12:19 p.m.
Program A and B got word wrapped by mistake...damn it. Program A
loop = block (print "alive") >> loop
main = do tid <- forkIO loop threadDelay 1 killThread tid
the above print "alive" forever while killThread stays blocked. Program B
loop = block (print "alive") >> loop >> yield
main = do tid <- forkIO loop threadDelay 1 killThread tid
the above prints "alive" about twice before killThread succeeds.