/libcore/luni/src/main/java/java/util/concurrent/ |
D | AbstractExecutorService.java | 110 private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, in doInvokeAny() argument 113 if (tasks == null) in doInvokeAny() 115 int ntasks = tasks.size(); in doInvokeAny() 133 Iterator<? extends Callable<T>> it = tasks.iterator(); in doInvokeAny() 181 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny() argument 184 return doInvokeAny(tasks, false, 0); in invokeAny() 191 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny() argument 194 return doInvokeAny(tasks, true, unit.toNanos(timeout)); in invokeAny() 197 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll() argument 199 if (tasks == null) in invokeAll() [all …]
|
D | ExecutorService.java | 244 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll() argument 274 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll() argument 296 <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny() argument 321 <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny() argument
|
D | Executors.java | 601 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) 603 return e.invokeAll(tasks); 605 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, 608 return e.invokeAll(tasks, timeout, unit); 610 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) 612 return e.invokeAny(tasks); 614 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, 617 return e.invokeAny(tasks, timeout, unit);
|
D | ForkJoinTask.java | 740 public static void invokeAll(ForkJoinTask<?>... tasks) { in invokeAll() argument 742 int last = tasks.length - 1; in invokeAll() 744 ForkJoinTask<?> t = tasks[i]; in invokeAll() 755 ForkJoinTask<?> t = tasks[i]; in invokeAll() 784 public static <T extends ForkJoinTask<?>> Collection<T> invokeAll(Collection<T> tasks) { in invokeAll() argument 785 if (!(tasks instanceof RandomAccess) || !(tasks instanceof List<?>)) { in invokeAll() 786 invokeAll(tasks.toArray(new ForkJoinTask<?>[tasks.size()])); in invokeAll() 787 return tasks; in invokeAll() 791 (List<? extends ForkJoinTask<?>>) tasks; in invokeAll() 816 return tasks; in invokeAll()
|
D | ThreadPoolExecutor.java | 1381 List<Runnable> tasks; in shutdownNow() local 1388 tasks = drainQueue(); in shutdownNow() 1393 return tasks; in shutdownNow()
|
D | ForkJoinPool.java | 2583 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) { in invokeAll() argument 2587 ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size()); in invokeAll() 2591 for (Callable<T> t : tasks) { in invokeAll()
|
/libcore/luni/src/main/java/java/util/ |
D | Timer.java | 181 private TimerHeap tasks = new TimerHeap(); field in Timer.TimerImpl 208 if (tasks.isEmpty()) { in run() 222 task = tasks.minimum(); in run() 227 tasks.delete(0); in run() 248 if (tasks.minimum().when != task.when) { in run() 249 pos = tasks.getTask(task); in run() 252 tasks.delete(tasks.getTask(task)); in run() 260 tasks.delete(pos); in run() 298 tasks.insert(newTask); in insertTask() 307 tasks.reset(); in cancel() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ScheduledExecutorTest.java | 528 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testGetQueue() local 529 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 535 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testGetQueue() 539 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 540 assertFalse(q.contains(tasks[0])); in testGetQueue() 552 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testRemove() local 556 for (int i = 0; i < tasks.length; i++) { in testRemove() 562 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testRemove() 566 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() 567 assertTrue(q.contains((Runnable)tasks[4])); in testRemove() [all …]
|
D | ThreadPoolExecutorTest.java | 499 FutureTask[] tasks = new FutureTask[5]; in testGetQueue() local 500 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 508 tasks[i] = new FutureTask(task); in testGetQueue() 509 p.execute(tasks[i]); in testGetQueue() 513 assertFalse(q.contains(tasks[0])); in testGetQueue() 514 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 515 assertEquals(tasks.length - 1, q.size()); in testGetQueue() 531 Runnable[] tasks = new Runnable[5]; in testRemove() local 535 for (int i = 0; i < tasks.length; i++) { in testRemove() 536 tasks[i] = new CheckedRunnable() { in testRemove() [all …]
|
D | ScheduledExecutorSubclassTest.java | 577 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testGetQueue() local 578 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 584 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testGetQueue() 588 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 589 assertFalse(q.contains(tasks[0])); in testGetQueue() 601 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testRemove() local 605 for (int i = 0; i < tasks.length; i++) { in testRemove() 611 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testRemove() 615 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() 616 assertTrue(q.contains((Runnable)tasks[4])); in testRemove() [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 572 FutureTask[] tasks = new FutureTask[5]; in testGetQueue() local 573 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 581 tasks[i] = new FutureTask(task); in testGetQueue() 582 p.execute(tasks[i]); in testGetQueue() 586 assertFalse(q.contains(tasks[0])); in testGetQueue() 587 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 588 assertEquals(tasks.length - 1, q.size()); in testGetQueue() 604 Runnable[] tasks = new Runnable[6]; in testRemove() local 608 for (int i = 0; i < tasks.length; i++) { in testRemove() 609 tasks[i] = new CheckedRunnable() { in testRemove() [all …]
|
/libcore/dalvik/src/main/java/dalvik/system/ |
D | ZygoteHooks.java | 70 File tasks = new File("/proc/self/task"); in waitUntilAllThreadsStopped() local 71 while (tasks.list().length > 1) { in waitUntilAllThreadsStopped()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TimerTest.java | 277 TimerTestTask[] tasks = new TimerTestTask[100]; in test_purge() local 282 tasks[i] = new TimerTestTask(); in test_purge() 283 t.schedule(tasks[i], delayTime[j++], 200); in test_purge() 290 tasks[i].cancel(); in test_purge()
|