[concurrency-interest] Why not expose array entry atomic/volatile operations directly?

Bill Pugh pugh at cs.umd.edu
Tue Jan 3 17:27:28 EST 2012

On Dec 19, 2011, at 7:07 PM, Charles Oliver Nutter wrote:
> What surprised me was that a plain old array could be magically
> treated as having volatile entries just by "cheating" and going
> directly to unsafe. So my question is this...why isn't there an
> AtomicReferenceArrayUpdater or similar "external" way to get
> volatile/atomic behavior against array entries?
> - Charlie

Among other reasons, I presume because there are _no_ semantics defined for what happens when you have a memory location that is sometimes accesses as a volatile memory location and sometimes accessed as a normal memory location.

Bill Pugh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120103/e23b2e0d/attachment.html>

More information about the Concurrency-interest mailing list