
From: Gregory Collins
Sent: Thu, March 31, 2011 5:03:09 AM
I find this behaviour a little annoying. Sometimes I *want* the thread to block indefinitely! I.e. I want it to block until it receives a KillThread exception. Is there a better way to accomplish that without waiting on an MVar which will never fill? As a workaround what I've been doing lately is stashing another reference to the mvar somewhere else (I'm guessing the trigger condition for "BlockedIndefinitelyOnMVar" is "blocked and mvar refcount == 1").
If you plan to send an exception, you must have the ThreadId saved elsewhere, which should prevent the BlockedIndefinitelyOnMVar exception. http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.3.1.0/Control-C... Brandon