id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
5055	"STM Exception ""BlockedIndefinitelyOnSTM"" throws to wrong thread"	guest		"This might be two bugs.  The attached test file (tvarTest.hs) aims to use a separate thread catching a ""BlockedIndefinitelyOnSTM"" exception to adjust the state of another TVar (a poor mans finalizer on TVars).

More concretely, with TVars ""b"" and ""i"" I have a thread (running ""gcTVar"") retrying on a read of ""i"" then alters ""b"" if/when the BlockIndefinitelyOnSTM exception is received.  My main thread waits for the state of ""b"" to change (which is should, due to ""gcTVar"").

Unfortunately, compiling with GHC (6.12.3, 7.0.1, 7.0.3, threaded or not, optimized or not, it all behaves the same) the main thread receives the exception and not the thread running ""gcTVar"".

The behavior is different in GHCi.  GHCi seems to operate correctly."	bug	closed	normal		Compiler	7.0.3	wontfix	stm		Unknown/Multiple	Unknown/Multiple	None/Unknown					
