[concurrency-interest] Extended access methods for Atomics (and AQS)

Doug Lea dl at cs.oswego.edu
Thu Apr 15 10:45:14 EDT 2010


On 04/14/10 10:55, Bryan Thompson wrote:

> What about eventually consistent increment() and add() methods which do not
> rely on CAS operations and are thus not subject to spins under concurrent
> requests?

We do define the AtomicInteger increment and add operations so
they can be intrinsified on platforms supporting atomic arithmetic
read-modify-write. I don't think any JVMs do so; probably
because these aren't usually faster, or enough faster, on most
platforms than CAS versions to bother.

-Doug



More information about the Concurrency-interest mailing list