How to get BlockedOnDeadMVar exception?
Fri, 13 Oct 2000 05:55:34 -0700
> On Fri, Oct 13, 2000 at 04:01:00AM -0700, Simon Marlow wrote:
> > Sure it's implemented. However, a main thread will never
> get this exception
> > (at the moment). Try this example in 4.08.1:
> Funny, it works and almost looks the same like my code. Only
> I was using a getLine-loop for preventing the main thread
> from exiting.
> Could this be the reason I don't get the exception?
probably: the exception is generated as a result of the thread being
discovered unreachable during garbage collection. If there's no garbage
collection, eg. because the program is waiting for I/O, then the exception
is never raised.
Which brings up an interesting subject: should the RTS start a GC after it
has been waiting for I/O for a certain length of time? If so, how long?