On Tuesday, 9 April 2013 at 08:00:38 UTC, Manu wrote:No, globals are also thread-local by default.
Errrm, only globals are shared by default.
Locals or allocated memory are not thread-local, can be passed wherever
they want, including other threads.
Everything is.
And it was intended that all variables that are supposed to be shared by threads in any reference-based manner are marked by shared, so you can't get it without copying or casting shared away (undefined!).
Well, have I mentioned that "shared" implementation is somewhat lacking in D now? :)