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.94 by jsr166, Mon Jun 20 05:51:28 2011 UTC vs.
Revision 1.95 by jsr166, Mon Jun 20 06:48:56 2011 UTC

# Line 293 | Line 293 | public class FutureTask<V> implements Ru
293      }
294  
295      /**
296 <     * Ensures that any interrupt from a possible cancel(true) does
297 <     * not leak into subsequent code.
296 >     * Ensures that any interrupt from a possible cancel(true) is only
297 >     * delivered to a task while in run or runAndReset.
298       */
299      private void handlePossibleCancellationInterrupt(int s) {
300          // It is possible for our interrupter to stall before getting a
# Line 305 | Line 305 | public class FutureTask<V> implements Ru
305          }
306          // assert state == INTERRUPTED;
307  
308 <        // Clear any interrupt we may have received from cancel(true).
309 <        Thread.interrupted();
308 >        // We want to clear any interrupt we may have received from
309 >        // cancel(true).  However, it is permissible to use interrupts
310 >        // as an independent mechanism for a task to communicate with
311 >        // its caller, and there is no way to clear only the
312 >        // cancellation interrupt.
313 >        //
314 >        // Thread.interrupted();
315      }
316  
317      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines