[concurrency-interest] AtomicReference.updateAndGet() mandatory updating
aph at redhat.com
Sat May 27 01:58:49 EDT 2017
On 26/05/17 22:35, Hans Boehm wrote:
> Thus, aside from possible really obscure progress/liveness issues, I
> really don't see the difference. I think this requirement, if it is
> indeed not vacuous and completely ignorable, would lengthen the
> ARMv8 code sequence for a CAS by at least 2 instructions, and
> introduce a very obscure divergence from C and C++.
It's the latter, the divergence from C and C++, that seems most
unfortunate to me. The extra fence will cost everyone, but most
people won't be aware of it. And code which does take advantage
of the fence will be *very* obscure. If there is any such code...
> I'm worried that we're adding something to make RMW operations
behave more like fences. They don't, they can't, and they shouldn't.
I couldn't agree more.
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