[concurrency-interest] AtomicReference.updateAndGet() mandatory updating

Andrew Haley aph at redhat.com
Thu Jun 1 13:43:45 EDT 2017

On 01/06/17 17:58, Gil Tene wrote:
>> On Jun 1, 2017, at 9:53 AM, Andrew Haley <aph at redhat.com> wrote:
>> On 01/06/17 16:19, Gil Tene wrote:
>>> I think the property is that a failing CAS is strictly after the store that failed it, period. Regardless of whether or not that store was volatile.
>> How is that even possible?  The store that fails a CAS can propagate
>> to different threads later: it's not part of the total order.  Perhaps
>> I'm missing something.
> It can. But the CAS failed *because* of that store [it is not allowed to spuriously fail], so the CAS is after that store. And things that are after the CAS are therefore also after that store.

OK, I see.  Thanks.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the Concurrency-interest mailing list