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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 4 13:43:55 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=4890



--- Comment #2 from Sean Kelly <sean at invisibleduck.org> 2011-01-04 13:41:41 PST ---
It turns out that the fix I applied produces a race condition with the GC. 
I'll have to re-wrap Thread.start() in a synchronized block as per the code
prior to rev 392.  This may re-introduce the deadlock, in which case it will be
necessary to replace the isRunning flag with a state field that distinguishes
starting from running.  A starting thread should be suspended/resumed but not
scanned.  Or perhaps something else can be sorted out to deal with a thread
being in the list that doesn't have its TLS section set, getThis() doesn't
work, etc.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list