[concurrency-interest] Difference between AtomicReference.getPlain() and getOpaque()
marnikitta at gmail.com
Sun Oct 15 04:54:04 EDT 2017
Here's note by Doug Lea on memory orderings in JDK 9.
On Sun, Oct 15, 2017 at 11:38 AM, Florian Weimer <fw at deneb.enyo.de> wrote:
> Are these methods essentially the same? I think so, based on JLS §17.7:
> | Writes to and reads of references are always atomic, regardless of
> | whether they are implemented as 32-bit or 64-bit values.
> I assume there is a difference between getPlain() and getOpaque() for
> AtomicLong because of potentially non-atomic access: I assume
> getOpaque() rules that out (but that is not very clear), but
> getPlain() obviously does not.
> Whatabout AtomicInteger and AtomicBoolean? Do these methods show a
> difference there?
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest