#3997: Lazy I/O and asynchronous exceptions don't mix well
---------------------------------+------------------------------------------
Reporter: simonmar | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.14.1
Component: libraries/base | Version: 6.12.1
Keywords: | Difficulty:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
This program:
{{{
import Control.Concurrent
import Control.Exception
main = do
s <- getContents
t <- forkIO $ evaluate (length s) >> return ()
threadDelay 1000
killThread t
print (length s)
}}}
results in
{{{
$ ./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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3997>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs