[concurrency-interest] Using Atomic*FieldUpdater to remove indirection

Vitaly Davidovich vitalyd at gmail.com
Wed Feb 13 15:51:33 EST 2013

Can you elaborate a bit? Do you mean using AtomicInteger (as an example)
instead of an int field inside a class? If so, I'd personally pad out the
class with filler fields to avoid false sharing - there's no guarantee that
the indirection via AtomicXXX will put memory far apart; padding gives you
a bit more control here.

Sent from my phone
On Feb 13, 2013 3:44 PM, "Ariel Weisberg" <ariel at weisberg.ws> wrote:

> Hi,
> Does it make sense to use Atomic*FieldUpdater to remove the indirection
> overhead of an AtomicLong and AtomicReference? Similarly, does it make
> sense to use Atomic* to create indirection in order to avoid false
> sharing?
> Thanks,
> Ariel
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20130213/b19cb32b/attachment.html>

More information about the Concurrency-interest mailing list