Understanding behavior of BlockedIndefinitelyOnMVar exception

Edward Z. Yang ezyang at MIT.EDU
Mon Jul 25 04:07:32 CEST 2011


Excerpts from Felipe Almeida Lessa's message of Sun Jul 24 22:02:36 -0400 2011:
> 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 =).

That's correct.

   resurrectThreads is called after garbage collection on the list of
   threads found to be garbage.  Each of these threads will be woken
   up and sent a signal: BlockedOnDeadMVar if the thread was blocked
   on an MVar, or NonTermination if the thread was blocked on a Black
   Hole.

Cheers,
Edward



More information about the Glasgow-haskell-users mailing list