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.17 by dl, Sat Dec 20 18:57:32 2003 UTC vs.
Revision 1.18 by dl, Sun Dec 21 14:55:52 2003 UTC

# Line 110 | Line 110 | public class FutureTask<V> implements Fu
110              Object r = runner;
111              if (r == DONE || r == CANCELLED)
112                  return false;
113 +            runner = CANCELLED;
114              if (mayInterruptIfRunning && r != null && r instanceof Thread)
115                  ((Thread)r).interrupt();
116 <            runner = CANCELLED;
116 >            // propagate to nested future
117 >            Runnable subtask = runnable;
118 >            if (subtask != null && subtask instanceof Future)
119 >                ((Future<?>)subtask).cancel(false);
120          }
121          finally{
122              lock.unlock();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines