Lazy I/O and asynchronous exceptions don't mix well
|Reported by:||simonmar||Owned by:|
|Type of failure:||Incorrect result at runtime||Test Case:|
|Related Tickets:||Differential Rev(s):|
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, but since I'm not sure that #2558 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.