[Issue 15939] GC.collect causes deadlock in multi-threaded environment

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 11 03:13:07 PDT 2016


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

--- Comment #21 from Martin Nowak <code at dawg.eu> ---
Nope, that doesn't seem to be the problem.
All the thread exit code synchronizes on Thread.slock_nothrow.
It shouldn't even be possible to send a signal to an exiting thread, b/c they
get removed from the thread list before that, and that is synchronized around
the suspend loop.

Might still be a problem with the synchronization of m_isRunning and/or
thread_cleanupHandler. Did your apps by any chance use thread cancellation or
pthread_exit?

--


More information about the Digitalmars-d-bugs mailing list