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.4 by dl, Sun Dec 14 22:36:36 2003 UTC vs.
Revision 1.5 by dl, Mon Dec 15 00:29:49 2003 UTC

# Line 160 | Line 160 | public abstract class AbstractExecutorSe
160  
161      // any/all methods, each a little bit different than the other
162  
163 <    public List<Future<?>> runAny(Collection<Runnable> tasks)
163 >    public List<Future<?>> runAny(List<Runnable> tasks)
164          throws InterruptedException {
165          if (tasks == null)
166              throw new NullPointerException();
# Line 179 | Line 179 | public abstract class AbstractExecutorSe
179                      execute(f);
180              }
181              int first = waiter.await();
182            if (first > 0)
183                Collections.swap(futures, first, 0);
182              return futures;
183          } finally {
184              for (Future<?> f : futures)
# Line 188 | Line 186 | public abstract class AbstractExecutorSe
186          }
187      }
188  
189 <    public List<Future<?>> runAny(Collection<Runnable> tasks,
189 >    public List<Future<?>> runAny(List<Runnable> tasks,
190                                    long timeout, TimeUnit unit)
191          throws InterruptedException {
192          if (tasks == null || unit == null)
# Line 209 | Line 207 | public abstract class AbstractExecutorSe
207                      execute(f);
208              }
209              int first = waiter.awaitNanos(nanos);
212            if (first > 0)
213                Collections.swap(futures, first, 0);
210              return futures;
211          } finally {
212              for (Future<?> f : futures)
# Line 220 | Line 216 | public abstract class AbstractExecutorSe
216  
217  
218  
219 <    public List<Future<?>> runAll(Collection<Runnable> tasks)
219 >    public List<Future<?>> runAll(List<Runnable> tasks)
220          throws InterruptedException {
221          if (tasks == null)
222              throw new NullPointerException();
# Line 246 | Line 242 | public abstract class AbstractExecutorSe
242          }
243      }
244  
245 <    public List<Future<?>> runAll(Collection<Runnable> tasks,
245 >    public List<Future<?>> runAll(List<Runnable> tasks,
246                                    long timeout, TimeUnit unit)
247          throws InterruptedException {
248          if (tasks == null || unit == null)
# Line 274 | Line 270 | public abstract class AbstractExecutorSe
270          }
271      }
272  
273 <    public <T> List<Future<T>> callAny(Collection<Callable<T>> tasks)
273 >    public <T> List<Future<T>> callAny(List<Callable<T>> tasks)
274          throws InterruptedException {
275          if (tasks == null)
276              throw new NullPointerException();
# Line 292 | Line 288 | public abstract class AbstractExecutorSe
288                      execute(f);
289              }
290              int first = waiter.await();
295            if (first > 0)
296                Collections.swap(futures, first, 0);
291              return futures;
292          } finally {
293              for (Future<T> f : futures)
# Line 301 | Line 295 | public abstract class AbstractExecutorSe
295          }
296      }
297  
298 <    public <T> List<Future<T>> callAny(Collection<Callable<T>> tasks,
298 >    public <T> List<Future<T>> callAny(List<Callable<T>> tasks,
299                                         long timeout, TimeUnit unit)
300          throws InterruptedException {
301          if (tasks == null || unit == null)
# Line 321 | Line 315 | public abstract class AbstractExecutorSe
315                      execute(f);
316              }
317              int first = waiter.awaitNanos(nanos);
324            if (first > 0)
325                Collections.swap(futures, first, 0);
318              return futures;
319          } finally {
320              for (Future<T> f : futures)
# Line 331 | Line 323 | public abstract class AbstractExecutorSe
323      }
324  
325  
326 <    public <T> List<Future<T>> callAll(Collection<Callable<T>> tasks)
326 >    public <T> List<Future<T>> callAll(List<Callable<T>> tasks)
327          throws InterruptedException {
328          if (tasks == null)
329              throw new NullPointerException();
# Line 356 | Line 348 | public abstract class AbstractExecutorSe
348          }
349      }
350  
351 <    public <T> List<Future<T>> callAll(Collection<Callable<T>> tasks,
351 >    public <T> List<Future<T>> callAll(List<Callable<T>> tasks,
352                                         long timeout, TimeUnit unit)
353          throws InterruptedException {
354          if (tasks == null || unit == null)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines