[dmd-internals] __gshared vs shared

Walter Bright walter at digitalmars.com
Sat May 5 15:34:43 PDT 2012



On 5/5/2012 8:53 AM, Alex Rønne Petersen wrote:


On the druntime mailing list, we ended up discussing whether D
respects that global (__gshared) variables may well be changed by any
thread at any point in time. Is this the case?


Yes.

>   I.e. will the optimizer
> refrain from treating a read of a __gshared value as invariant in a
> loop?

Yes.


More information about the dmd-internals mailing list