[Issue 9641] Wrong module init order when a thread is created in a module ctor

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9641

--- Comment #2 from Vladimir Panteleev  ---
(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).

--


[Issue 9641] Wrong module init order when a thread is created in a module ctor

2014-05-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9641

Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 CC||c...@dawg.eu

--- Comment #1 from Martin Nowak c...@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.

--