# | Line 299 | Line 299 | public class FutureTask<V> implements Ru | |
---|---|---|
299 | private void handlePossibleCancellationInterrupt(int s) { | |
300 | // It is possible for our interrupter to stall before getting a | |
301 | // chance to interrupt us. Let's spin-wait patiently. | |
302 | < | if (s == INTERRUPTING) { |
303 | < | while ((s = state) == INTERRUPTING) |
302 | > | if (s == INTERRUPTING) |
303 | > | while (state == INTERRUPTING) |
304 | Thread.yield(); // wait out pending interrupt | |
305 | < | } |
305 | > | |
306 | // assert state == INTERRUPTED; | |
307 | ||
308 | // We want to clear any interrupt we may have received from |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |