On 5/7/13 10:31 AM, Steven Schveighoffer wrote:
On Tue, 07 May 2013 09:25:36 -0400, Andrei Alexandrescu
<[email protected]> wrote:
No. A tutorial on memory consistency models would be too long to
insert here. I don't know of a good online resource, does anyone?
In essence, a read requires an acquire memory barrier, a write requires
a release memory barrier, but in this case, we only need to be concerned
if the value we get back is not valid (i.e. NullValue).
Once in steady state, there is no need to acquire (as long as the write
is atomic, the read value will either be NullValue or ActualValue, not
something else).
There's always a need to acquire so as to figure whether the steady
state has been entered.
Andrei