5 |
|
*/ |
6 |
|
|
7 |
|
package java.util.concurrent.atomic; |
8 |
+ |
|
9 |
|
import sun.misc.Unsafe; |
10 |
|
|
11 |
|
/** |
125 |
|
* Atomically sets the value to the given updated value |
126 |
|
* if the current value {@code ==} the expected value. |
127 |
|
* |
128 |
< |
* <p>May <a href="package-summary.html#Spurious">fail spuriously</a> |
129 |
< |
* and does not provide ordering guarantees, so is only rarely an |
130 |
< |
* appropriate alternative to {@code compareAndSet}. |
128 |
> |
* <p><a href="package-summary.html#weakCompareAndSet">May fail |
129 |
> |
* spuriously and does not provide ordering guarantees</a>, so is |
130 |
> |
* only rarely an appropriate alternative to {@code compareAndSet}. |
131 |
|
* |
132 |
|
* @param expect the expected value |
133 |
|
* @param update the new value |