[jmm-dev] weakCompareAndSet memory semantics
Andrew Haley
aph at redhat.com
Wed Apr 20 10:03:47 UTC 2016
On 20/04/16 10:55, Aleksey Shipilev wrote:
> I wonder if that was the intended use for weakCAS in C++11, and if so,
> shouldn't we re-spec weakCAS in Java to have volatile/seq_cst memory
> effects?
Probably. Or, at least, we want a weakCompareAndSet which is sequentially
consistent. As a general principle: we have an opportunity to make Java's
operators consistent with those of C++, and we shouldn't mess that up.
Andrew.
More information about the jmm-dev
mailing list