/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | AbstractExecutorService.java | 147 private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, in doInvokeAny() argument 150 if (tasks == null) in doInvokeAny() 152 int ntasks = tasks.size(); in doInvokeAny() 170 Iterator<? extends Callable<T>> it = tasks.iterator(); in doInvokeAny() 217 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny() argument 220 return doInvokeAny(tasks, false, 0); in invokeAny() 227 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny() argument 230 return doInvokeAny(tasks, true, unit.toNanos(timeout)); in invokeAny() 233 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll() argument 235 if (tasks == null) in invokeAll() [all …]
|
D | ExecutorService.java | 277 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll() argument 308 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll() argument 331 <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny() argument 357 <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny() argument
|
D | Executors.java | 638 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) 640 return e.invokeAll(tasks); 642 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, 645 return e.invokeAll(tasks, timeout, unit); 647 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) 649 return e.invokeAny(tasks); 651 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, 654 return e.invokeAny(tasks, timeout, unit);
|
D | ForkJoinTask.java | 772 public static void invokeAll(ForkJoinTask<?>... tasks) { in invokeAll() argument 774 int last = tasks.length - 1; in invokeAll() 776 ForkJoinTask<?> t = tasks[i]; in invokeAll() 787 ForkJoinTask<?> t = tasks[i]; in invokeAll() 817 public static <T extends ForkJoinTask<?>> Collection<T> invokeAll(Collection<T> tasks) { in invokeAll() argument 818 if (!(tasks instanceof RandomAccess) || !(tasks instanceof List<?>)) { in invokeAll() 819 invokeAll(tasks.toArray(new ForkJoinTask<?>[tasks.size()])); in invokeAll() 820 return tasks; in invokeAll() 824 (List<? extends ForkJoinTask<?>>) tasks; in invokeAll() 849 return tasks; in invokeAll()
|
D | ThreadPoolExecutor.java | 1433 List<Runnable> tasks; in shutdownNow() local 1440 tasks = drainQueue(); in shutdownNow() 1445 return tasks; in shutdownNow()
|
D | ForkJoinPool.java | 2832 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) { in invokeAll() argument 2836 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll() 2839 for (Callable<T> t : tasks) { in invokeAll()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadPoolExecutorSubclassTest.java | 667 FutureTask[] tasks = new FutureTask[5]; in testGetQueue() local 668 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 676 tasks[i] = new FutureTask(task); in testGetQueue() 677 p.execute(tasks[i]); in testGetQueue() 681 assertFalse(q.contains(tasks[0])); in testGetQueue() 682 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 683 assertEquals(tasks.length - 1, q.size()); in testGetQueue() 698 Runnable[] tasks = new Runnable[6]; in testRemove() local 700 for (int i = 0; i < tasks.length; i++) { in testRemove() 701 tasks[i] = new CheckedRunnable() { in testRemove() [all …]
|
D | ThreadPoolExecutorTest.java | 552 FutureTask[] tasks = new FutureTask[5]; in testGetQueue() local 553 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 561 tasks[i] = new FutureTask(task); in testGetQueue() 562 p.execute(tasks[i]); in testGetQueue() 566 assertFalse(q.contains(tasks[0])); in testGetQueue() 567 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 568 assertEquals(tasks.length - 1, q.size()); in testGetQueue() 583 Runnable[] tasks = new Runnable[6]; in testRemove() local 585 for (int i = 0; i < tasks.length; i++) { in testRemove() 586 tasks[i] = new CheckedRunnable() { in testRemove() [all …]
|
D | ScheduledExecutorTest.java | 587 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testGetQueue() local 588 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 594 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testGetQueue() 598 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 599 assertFalse(q.contains(tasks[0])); in testGetQueue() 610 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testRemove() local 612 for (int i = 0; i < tasks.length; i++) { in testRemove() 618 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testRemove() 622 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() 623 assertTrue(q.contains((Runnable)tasks[4])); in testRemove() [all …]
|
D | ScheduledExecutorSubclassTest.java | 639 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testGetQueue() local 640 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 646 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testGetQueue() 650 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 651 assertFalse(q.contains(tasks[0])); in testGetQueue() 662 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testRemove() local 664 for (int i = 0; i < tasks.length; i++) { in testRemove() 670 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testRemove() 674 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() 675 assertTrue(q.contains((Runnable)tasks[4])); in testRemove() [all …]
|
D | ForkJoinTask8Test.java | 806 AsyncFib[] tasks = { 810 invokeAll(tasks[0], tasks[1]); 811 for (AsyncFib task : tasks) assertTrue(task.isDone()); 812 for (AsyncFib task : tasks) task.checkCompletedNormally(); 829 AsyncFib[] tasks = { 834 invokeAll(tasks[0], tasks[1], tasks[2]); 835 for (AsyncFib task : tasks) assertTrue(task.isDone()); 836 for (AsyncFib task : tasks) task.checkCompletedNormally(); 853 AsyncFib[] tasks = { 858 invokeAll(Arrays.asList(tasks)); [all …]
|
D | ForkJoinTaskTest.java | 903 ForkJoinTask[] tasks = { f, g }; 904 Collections.shuffle(Arrays.asList(tasks)); 906 invokeAll(tasks); 941 ForkJoinTask[] tasks = { f, g, h }; 942 Collections.shuffle(Arrays.asList(tasks)); 944 invokeAll(tasks); 962 ForkJoinTask[] tasks = { f, g, h }; 963 List taskList = Arrays.asList(tasks); 1573 ForkJoinTask[] tasks = { f, g }; 1574 Collections.shuffle(Arrays.asList(tasks)); [all …]
|
D | AbstractExecutorServiceTest.java | 585 List<Callable<String>> tasks = new ArrayList<>(); 586 tasks.add(new StringTask("0")); 587 tasks.add(Executors.callable(possiblyInterruptedRunnable(timeout), 589 tasks.add(new StringTask("2")); 592 e.invokeAll(tasks, timeout, MILLISECONDS); 593 assertEquals(tasks.size(), futures.size());
|
/libcore/dalvik/src/main/java/dalvik/system/ |
D | ZygoteHooks.java | 84 File tasks = new File("/proc/self/task"); in waitUntilAllThreadsStopped() local 87 while (tasks.list().length > 1) { in waitUntilAllThreadsStopped()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TimerTest.java | 281 TimerTestTask[] tasks = new TimerTestTask[100]; in test_purge() local 286 tasks[i] = new TimerTestTask(); in test_purge() 287 t.schedule(tasks[i], delayTime[j++], 200); in test_purge() 294 tasks[i].cancel(); in test_purge()
|