id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
2651	BlockedIndefinitely not thrown when it should be	govereau		"The following program demonstrates the bug.
When run with no arguments, the ""die"" thread gets a BlockedIndefinitely exception, when run with command line arguments it does not.
{{{
module Main where
import Control.Monad
import Control.Concurrent
import Control.Concurrent.STM
import System.Environment

main :: IO ()
main = do { flags <- getArgs
           ; if (length flags > 0)
            then forkIO die >>         -- die does not die
                 threadDelay 10000000
            else die                   -- die dies         
          }

-- expect BlockedIndefinitely exception to be thrown
die :: IO ()
die = newTVarIO ""die"" >>= f >>= print
 where f tv = atomically $ do { x <- readTVar tv
                              ; if x == ""die"" then retry else return x
                              }
}}}"	bug	closed	normal	6.10 branch	Runtime System	6.8.3	wontfix			Unknown/Multiple	Unknown/Multiple		Unknown				
