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

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


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

--- Comment #22 from Илья Ярошенко <ilyayaroshenko at gmail.com> ---
(In reply to Martin Nowak from comment #21)
> 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?

No, but an Exception may be thrown in a thread.

--


More information about the Digitalmars-d-bugs mailing list