[Haskell-cafe] STM and garbage collector

Michael Sloan mgsloan at gmail.com
Sun Oct 18 03:23:28 UTC 2015

In this case, the GC will indeed find that no one has a reference to the
thread.  However, instead of garbage collecting the thread, the
BlockedIndefinitely exception is thrown to it.  So, it resumes execution of
the thread with that exception.

This also applies to threads blocked on MVars.


On Sat, Oct 17, 2015 at 9:11 AM, Tomas Carnecky <tomas.carnecky at gmail.com>

> If a thread is blocking indefinitely in an STM transaction (reading from a
> queue to which nobody else has a reference and thus can not write into), is
> the runtime smart enough to GC the thread? Or do I have to kill the thread
> manually?
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151017/c1e275d4/attachment.html>

More information about the Haskell-Cafe mailing list