RFR 8164814: Deprecate Atomic*.weakCompareAndSet and defer to Atomic*.weakCompareAndSetPlain

Paul Sandoz paul.sandoz at oracle.com
Thu Aug 25 20:48:10 UTC 2016


Hi,

Please review:

  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8164814--atomics-weakCompareAndSet-deprecate/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8164814--atomics-weakCompareAndSet-deprecate/webrev/>

This patch deprecates weakCompareAndSet and adds a new method weakCompareAndSetPlain. The intent is to avoid confusion over the memory effects of such methods, since other read-modify-write methods, with unqualified names, have volatile memory effects.

I just modified atomic classes that have already been updated for Java 9 [*].

Paul.

[*] atomic classes not updated:
  AtomicIntegerFieldUpdater
  AtomicLongFieldUpdater
  AtomicMarkableReference
  AtomicReferenceFieldUpdater
  AtomicStampedReference



More information about the core-libs-dev mailing list