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

Comparing jsr166/src/main/java/util/concurrent/AbstractExecutorService.java (file contents):
Revision 1.25 by jsr166, Mon Aug 15 20:37:03 2005 UTC vs.
Revision 1.26 by jsr166, Thu Aug 25 19:28:16 2005 UTC

# Line 96 | Line 96 | public abstract class AbstractExecutorSe
96      /**
97       * the main mechanics of invokeAny.
98       */
99 <    private <T> T doInvokeAny(Collection<Callable<T>> tasks,
99 >    private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks,
100                              boolean timed, long nanos)
101          throws InterruptedException, ExecutionException, TimeoutException {
102          if (tasks == null)
# Line 119 | Line 119 | public abstract class AbstractExecutorSe
119              // result, we can throw the last exception we got.
120              ExecutionException ee = null;
121              long lastTime = (timed)? System.nanoTime() : 0;
122 <            Iterator<Callable<T>> it = tasks.iterator();
122 >            Iterator<? extends Callable<T>> it = tasks.iterator();
123  
124              // Start one task for sure; the rest incrementally
125              futures.add(ecs.submit(it.next()));
# Line 171 | Line 171 | public abstract class AbstractExecutorSe
171          }
172      }
173  
174 <    public <T> T invokeAny(Collection<Callable<T>> tasks)
174 >    public <T> T invokeAny(Collection<? extends Callable<T>> tasks)
175          throws InterruptedException, ExecutionException {
176          try {
177              return doInvokeAny(tasks, false, 0);
# Line 181 | Line 181 | public abstract class AbstractExecutorSe
181          }
182      }
183  
184 <    public <T> T invokeAny(Collection<Callable<T>> tasks,
184 >    public <T> T invokeAny(Collection<? extends Callable<T>> tasks,
185                             long timeout, TimeUnit unit)
186          throws InterruptedException, ExecutionException, TimeoutException {
187          return doInvokeAny(tasks, true, unit.toNanos(timeout));
188      }
189  
190 <    public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks)
190 >    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
191          throws InterruptedException {
192          if (tasks == null)
193              throw new NullPointerException();
# Line 217 | Line 217 | public abstract class AbstractExecutorSe
217          }
218      }
219  
220 <    public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks,
220 >    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,
221                                           long timeout, TimeUnit unit)
222          throws InterruptedException {
223          if (tasks == null || unit == null)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines