Lazy I/O and asynchronous exceptions don't mix well
import Control.Concurrent import Control.Exception main = do s <- getContents t <- forkIO $ evaluate (length s) >> return () threadDelay 1000 killThread t print (length s)
$ ./async async: thread killed
when really it should just wait for input.
The problem is #2558 (closed), but since I'm not sure that #2558 (closed) has a general solution (see comments on that ticket) I thought I'd open a ticket for this specific case. It's amazing nobody has complained about this before.