[Issue 17476] Static fields don't seem to be reliably initialized when using parallel()
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Wed Jun  7 10:15:01 PDT 2017
    
    
  
https://issues.dlang.org/show_bug.cgi?id=17476
--- Comment #8 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to Mathias Lang from comment #7)
> How can
> "foobar" be printed twice if it's only set for one thread ?
Because both times "foobar" is written are done from the same (main) thread.
parallel() can (and does) reuse threads.
--
    
    
More information about the Digitalmars-d-bugs
mailing list