5 |
|
*/ |
6 |
|
|
7 |
|
package java.util.concurrent.atomic; |
8 |
+ |
|
9 |
|
import sun.misc.Unsafe; |
10 |
|
|
11 |
|
/** |
111 |
|
* Atomically sets the value to the given updated value |
112 |
|
* if the current value {@code ==} the expected value. |
113 |
|
* |
114 |
< |
* <p>May <a href="package-summary.html#Spurious">fail spuriously</a> |
115 |
< |
* and does not provide ordering guarantees, so is only rarely an |
116 |
< |
* appropriate alternative to {@code compareAndSet}. |
114 |
> |
* <p><a href="package-summary.html#weakCompareAndSet">May fail |
115 |
> |
* spuriously and does not provide ordering guarantees</a>, so is |
116 |
> |
* only rarely an appropriate alternative to {@code compareAndSet}. |
117 |
|
* |
118 |
|
* @param expect the expected value |
119 |
|
* @param update the new value |