ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/FutureTask.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/FutureTask.java (file contents):
Revision 1.95 by jsr166, Mon Jun 20 06:48:56 2011 UTC vs.
Revision 1.96 by jsr166, Thu Jun 30 15:32:21 2011 UTC

# 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines