145 |
|
if (t != null) |
146 |
|
t.interrupt(); |
147 |
|
} finally { // final state |
148 |
< |
U.putOrderedInt(this, STATE, INTERRUPTED); |
148 |
> |
U.putIntRelease(this, STATE, INTERRUPTED); |
149 |
|
} |
150 |
|
} |
151 |
|
} finally { |
201 |
|
protected void set(V v) { |
202 |
|
if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { |
203 |
|
outcome = v; |
204 |
< |
U.putOrderedInt(this, STATE, NORMAL); // final state |
204 |
> |
U.putIntRelease(this, STATE, NORMAL); // final state |
205 |
|
finishCompletion(); |
206 |
|
} |
207 |
|
} |
219 |
|
protected void setException(Throwable t) { |
220 |
|
if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { |
221 |
|
outcome = t; |
222 |
< |
U.putOrderedInt(this, STATE, EXCEPTIONAL); // final state |
222 |
> |
U.putIntRelease(this, STATE, EXCEPTIONAL); // final state |
223 |
|
finishCompletion(); |
224 |
|
} |
225 |
|
} |
455 |
|
} |
456 |
|
|
457 |
|
// Unsafe mechanics |
458 |
< |
private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); |
458 |
> |
private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe(); |
459 |
|
private static final long STATE; |
460 |
|
private static final long RUNNER; |
461 |
|
private static final long WAITERS; |