[concurrency-interest] Elements in AtomicReferenceArray and AtomicReference[] both distinct?

Raph Frank raphfrk at gmail.com
Wed Aug 1 11:24:38 EDT 2012


I always assumed that elements in an AtomicReferenceArray were
distinct.  Threads that accessed different elements would not
interfere.

This thread suggests otherwise, that the protection is at the entire
array level.

http://www.java-forums.org/threads-synchronization/25324-atomicreferencearray-t-equivalent-array-atomicreference-t.html

Which is correct, do an array of AtomicReferences give better concurrency?


More information about the Concurrency-interest mailing list