https://issues.dlang.org/show_bug.cgi?id=17476
--- Comment #8 from Vladimir Panteleev ---
(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
https://issues.dlang.org/show_bug.cgi?id=17476
--- Comment #7 from Mathias Lang ---
When a thread runs I would expect the following (simplified) course of action:
- Initialize the TLS data
- Do the writeln
- Exit
Given the original code, I would then expect the code to print 3 times
"/some/strin
https://issues.dlang.org/show_bug.cgi?id=17476
--- Comment #6 from Andrej Mitrovic ---
> In main, you set the TLS instance of path corresponding to the main thread to
> "foobar". The "parallel" loop body will use the current thread's TLS
> instance, but because the order of execution of threads
https://issues.dlang.org/show_bug.cgi?id=17476
--- Comment #5 from Vladimir Panteleev ---
(In reply to Mathias Lang from comment #4)
> So you can implicitly capture TLS variables and use them from other thread ?
> Doesn't that completely defeat the purpose of thread locality ?
I don't understand
https://issues.dlang.org/show_bug.cgi?id=17476
Mathias Lang changed:
What|Removed |Added
CC||mathias.l...@sociomantic.co
https://issues.dlang.org/show_bug.cgi?id=17476
Vladimir Panteleev changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=17476
Stefan Koch changed:
What|Removed |Added
CC||uplink.co...@gmail.com
--- Comment #2 from Ste
https://issues.dlang.org/show_bug.cgi?id=17476
--- Comment #1 from anonymous4 ---
In the first thread it will be "foobar", in other threads it will be
"/some/string/initializer", the exact sequence may depend on how parallel
selects threads.
--