Hi!I'm puzzled with what's the difference between shared and __gshared.
shared is part of the type, __gshared is not.The danger of __gshared is that the compiler treats it as if it were not shared. You better know what you are doing, lots of code expects that anything not marked as shared is thread-local.
shared was supposed to infer memory barriers, but AFAIK, it doesn't do that. Not sure it ever will.
-Steve