Thread overview
[Issue 9641] Wrong module init order when a thread is created in a module ctor
May 11, 2014
Martin Nowak
Jul 18, 2017
Vladimir Panteleev
May 11, 2014
https://issues.dlang.org/show_bug.cgi?id=9641

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu

--- Comment #1 from Martin Nowak <code@dawg.eu> ---
I think the fix would need a mutex which blocks all created threads until all shared module constructors are finished. This might easily cause deadlocks though.

--
July 18, 2017
https://issues.dlang.org/show_bug.cgi?id=9641

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to Martin Nowak from comment #1)
> I think the fix would need a mutex which blocks all created threads until all shared module constructors are finished. This might easily cause deadlocks though.

Sounds very similar to how Windows blocks threads created in DllMain. The deadlock issue is there as well (threads will remain suspended until initialization completes).

--
December 07
https://issues.dlang.org/show_bug.cgi?id=9641

--- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17249

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--