# | Line 256 | Line 256 | public class FutureTask<V> implements Ru | |
---|---|---|
256 | * @return true if successfully run and reset | |
257 | */ | |
258 | protected boolean runAndReset() { | |
259 | – | Thread r = Thread.currentThread(); |
259 | if (state != 0 || | |
260 | < | !UNSAFE.compareAndSwapObject(this, runnerOffset, null, r)) |
260 | > | !UNSAFE.compareAndSwapObject(this, runnerOffset, |
261 | > | null, Thread.currentThread())) |
262 | return false; | |
263 | try { | |
264 | callable.call(); // don't set result |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |