[Issue 4890] GC.collect() deadlocks multithreaded program.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 5 13:12:27 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=4890

--- Comment #22 from Sean Kelly <sean at invisibleduck.org> ---
Yes I misspoke somewhat.  The GC acquires the lock to the global thread list
while collecting to ensure that everything remains in a consistent state while
the collection takes place.  In this case the GC already holds this lock and
Thread.start() is blocked on it waiting to add the new thread to the list.

--


More information about the Digitalmars-d-bugs mailing list