module initialization order issue

Peter Alexander peter.alexander.au at gmail.com
Sun Mar 3 07:29:30 PST 2013


On Sunday, 3 March 2013 at 12:01:10 UTC, Benjamin Thaut wrote:
> Is this a bug, or is this intended beahvior? I always believed 
> that with all the dependency detenction that is done such 
> situation should not happen.

It's intended behaviour.

Remember that shared static this() is only run once for the whole 
program, whereas static this() is run per thread. Using 
per-thread data inside something that's run per-program doesn't 
make a whole lot of sense.


More information about the Digitalmars-d mailing list