--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java Tue Jun 13 13:31:32 2017 +0100
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java Tue Jun 13 09:13:28 2017 -0700
@@ -170,7 +170,8 @@
}
/**
- * Atomically updates the current value with the results of
+ * Atomically updates (with memory effects as specified by {@link
+ * VarHandle#compareAndSet}) the current value with the results of
* applying the given function, returning the previous value. The
* function should be side-effect-free, since it may be re-applied
* when attempted updates fail due to contention among threads.
@@ -191,7 +192,8 @@
}
/**
- * Atomically updates the current value with the results of
+ * Atomically updates (with memory effects as specified by {@link
+ * VarHandle#compareAndSet}) the current value with the results of
* applying the given function, returning the updated value. The
* function should be side-effect-free, since it may be re-applied
* when attempted updates fail due to contention among threads.
@@ -212,13 +214,14 @@
}
/**
- * Atomically updates the current value with the results of
+ * Atomically updates (with memory effects as specified by {@link
+ * VarHandle#compareAndSet}) the current value with the results of
* applying the given function to the current and given values,
* returning the previous value. The function should be
* side-effect-free, since it may be re-applied when attempted
- * updates fail due to contention among threads. The function
- * is applied with the current value as its first argument,
- * and the given update as the second argument.
+ * updates fail due to contention among threads. The function is
+ * applied with the current value as its first argument, and the
+ * given update as the second argument.
*
* @param x the update value
* @param accumulatorFunction a side-effect-free function of two arguments
@@ -238,13 +241,14 @@
}
/**
- * Atomically updates the current value with the results of
+ * Atomically updates (with memory effects as specified by {@link
+ * VarHandle#compareAndSet}) the current value with the results of
* applying the given function to the current and given values,
* returning the updated value. The function should be
* side-effect-free, since it may be re-applied when attempted
- * updates fail due to contention among threads. The function
- * is applied with the current value as its first argument,
- * and the given update as the second argument.
+ * updates fail due to contention among threads. The function is
+ * applied with the current value as its first argument, and the
+ * given update as the second argument.
*
* @param x the update value
* @param accumulatorFunction a side-effect-free function of two arguments