To help LDC/GDC

Dicebot m.strashun at gmail.com
Tue Apr 9 01:03:42 PDT 2013


On Tuesday, 9 April 2013 at 08:00:38 UTC, Manu wrote:
> Errrm, only globals are shared by default.
> Locals or allocated memory are not thread-local, can be passed 
> wherever
> they want, including other threads.

No, globals are also thread-local by default. 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? :)


More information about the Digitalmars-d mailing list