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

Joe Bowbeer joe.bowbeer at gmail.com
Sat Apr 17 16:05:01 EDT 2010

I think the proposal is to add AtomicIntegerEx extends AtomicInteger, and so
on, and to add the new methods to these for-experts-only subclasses.

On Sat, Apr 17, 2010 at 12:09 PM, Boehm, Hans wrote:

> I'm not sure I fully understand this proposal.  However, I think it's
> important to structure the interface so that, if you really need to use
> accessors with weaker ordering, you can mix them with more strongly ordered
> ones, including volatile style accesses.  For example, the second load in
> double-checked locking doesn't actually race with anything.  Thus it's
> unusually safe to use a "relaxed" (or even "nonVolatile") access here.  But
> that doesn't mean you want "relaxed" accesses everywhere.
> I think it's also very reasonable to write code initially to use only
> volatile-style (sequentially consistent)accesses, and then relax that only
> in performance critical cases that you've hopefully spent a lot of time
> thinking about.
> Hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100417/0cb3d004/attachment.html>

More information about the Concurrency-interest mailing list