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

Comparing jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java (file contents):
Revision 1.36 by dl, Wed Dec 3 21:07:44 2003 UTC vs.
Revision 1.37 by dl, Thu Dec 4 20:54:29 2003 UTC

# Line 983 | Line 983 | public class ThreadPoolExecutor implemen
983  
984  
985      /**
986 <     * Tries to remove from the work queue all {@link Cancellable}
986 >     * Tries to remove from the work queue all {@link Future}
987       * tasks that have been cancelled. This method can be useful as a
988       * storage reclamation operation, that has no other impact on
989       * functionality. Cancelled tasks are never executed, but may
# Line 999 | Line 999 | public class ThreadPoolExecutor implemen
999              Iterator<Runnable> it = getQueue().iterator();
1000              while (it.hasNext()) {
1001                  Runnable r = it.next();
1002 <                if (r instanceof Cancellable) {
1003 <                    Cancellable c = (Cancellable)r;
1002 >                if (r instanceof Future<?>) {
1003 >                    Future<?> c = (Future<?>)r;
1004                      if (c.isCancelled())
1005                          it.remove();
1006                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines