shared vs __gshared

bearophile bearophileHUGS at lycos.com
Mon Jun 10 07:18:03 PDT 2013


Sergei Nosov:

> Is this how shared is supposed to work? If so, how is the 
> __gshared different from it? Does it not guarantee that the 
> result of a write is instantly visible to all threads? If so, 
> does this difference really matter?

shared and __gshared are very different things. __gshared 
guarantees nothing, it's equivalent to a raw C global 
(module-level) variables.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list