
24 Jul
2011
24 Jul
'11
10:02 p.m.
On Sun, Jul 24, 2011 at 7:56 PM, Brandon Simmons
What I think I've learned here is that the BlockedIndefinitelyOnMVar exception is raised in all the blocked threads "at once" as it were. That despite the fact that the handler code in 'lockPrint' restores the lock for successive threads.
This would also seem to imply that putMVar's in an exception handler don't stop the runtime from raising the BlockedIndefinitelyOnMVar. But that doesn't really seem right.
Does anything change if you somehow force a GC sometime after "good2"? Perhaps with some calculation generating garbage, perhaps with performGC. IIRC, the runtime detects BlockedIndefinitelyOnMVar on GC. But I'm probably wrong =). Cheers, -- Felipe.