/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 | 648 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) 650 return e.invokeAll(tasks); 652 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, 655 return e.invokeAll(tasks, timeout, unit); 657 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) 659 return e.invokeAny(tasks); 661 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, 664 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 | 1438 List<Runnable> tasks; in shutdownNow() local 1445 tasks = drainQueue(); in shutdownNow() 1450 return tasks; in shutdownNow()
|
D | ForkJoinPool.java | 2835 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) { in invokeAll() argument 2839 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll() 2842 for (Callable<T> t : tasks) { in invokeAll()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ThreadPoolExecutorSubclassTest.java | 689 FutureTask[] tasks = new FutureTask[5]; in testGetQueue() local 690 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 698 tasks[i] = new FutureTask(task); in testGetQueue() 699 p.execute(tasks[i]); in testGetQueue() 703 assertFalse(q.contains(tasks[0])); in testGetQueue() 704 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 705 assertEquals(tasks.length - 1, q.size()); in testGetQueue() 720 Runnable[] tasks = new Runnable[6]; in testRemove() local 722 for (int i = 0; i < tasks.length; i++) { in testRemove() 723 tasks[i] = new CheckedRunnable() { in testRemove() [all …]
|
D | ThreadPoolExecutorTest.java | 574 FutureTask[] tasks = new FutureTask[5]; in testGetQueue() local 575 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 583 tasks[i] = new FutureTask(task); in testGetQueue() 584 p.execute(tasks[i]); in testGetQueue() 588 assertFalse(q.contains(tasks[0])); in testGetQueue() 589 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 590 assertEquals(tasks.length - 1, q.size()); in testGetQueue() 605 Runnable[] tasks = new Runnable[6]; in testRemove() local 607 for (int i = 0; i < tasks.length; i++) { in testRemove() 608 tasks[i] = new CheckedRunnable() { in testRemove() [all …]
|
D | ScheduledExecutorSubclassTest.java | 661 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testGetQueue() local 662 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 668 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testGetQueue() 672 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 673 assertFalse(q.contains(tasks[0])); in testGetQueue() 684 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testRemove() local 686 for (int i = 0; i < tasks.length; i++) { in testRemove() 692 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testRemove() 696 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() 697 assertTrue(q.contains((Runnable)tasks[4])); in testRemove() [all …]
|
D | ScheduledExecutorTest.java | 608 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testGetQueue() local 609 for (int i = 0; i < tasks.length; i++) { in testGetQueue() 615 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testGetQueue() 619 assertTrue(q.contains(tasks[tasks.length - 1])); in testGetQueue() 620 assertFalse(q.contains(tasks[0])); in testGetQueue() 631 ScheduledFuture[] tasks = new ScheduledFuture[5]; in testRemove() local 633 for (int i = 0; i < tasks.length; i++) { in testRemove() 639 tasks[i] = p.schedule(r, 1, MILLISECONDS); in testRemove() 643 assertFalse(p.remove((Runnable)tasks[0])); in testRemove() 644 assertTrue(q.contains((Runnable)tasks[4])); in testRemove() [all …]
|
D | ForkJoinTask8Test.java | 829 AsyncFib[] tasks = { 833 invokeAll(tasks[0], tasks[1]); 834 for (AsyncFib task : tasks) assertTrue(task.isDone()); 835 for (AsyncFib task : tasks) task.checkCompletedNormally(); 852 AsyncFib[] tasks = { 857 invokeAll(tasks[0], tasks[1], tasks[2]); 858 for (AsyncFib task : tasks) assertTrue(task.isDone()); 859 for (AsyncFib task : tasks) task.checkCompletedNormally(); 876 AsyncFib[] tasks = { 881 invokeAll(Arrays.asList(tasks)); [all …]
|
D | ForkJoinTaskTest.java | 925 ForkJoinTask[] tasks = { f, g }; 926 shuffle(tasks); 928 invokeAll(tasks); 963 ForkJoinTask[] tasks = { f, g, h }; 964 shuffle(tasks); 966 invokeAll(tasks); 984 ForkJoinTask[] tasks = { f, g, h }; 985 shuffle(tasks); 987 invokeAll(Arrays.asList(tasks)); 1594 ForkJoinTask[] tasks = { f, g }; [all …]
|
D | AbstractExecutorServiceTest.java | 608 List<Callable<String>> tasks = new ArrayList<>(); 609 tasks.add(new StringTask("0")); 610 tasks.add(Executors.callable(possiblyInterruptedRunnable(timeout), 612 tasks.add(new StringTask("2")); 615 e.invokeAll(tasks, timeout, MILLISECONDS); 616 assertEquals(tasks.size(), futures.size());
|
D | Collection8Test.java | 849 final List<Runnable> tasks = 860 threadsStarted.bulkRegister(tasks.size()); 861 futures = tasks.stream()
|
/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 | 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 | 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 | 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/ojluni/annotations/hiddenapi/java/util/concurrent/ |
D | Executors.java | 231 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) in invokeAll() argument 237 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, in invokeAll() argument 245 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) in invokeAny() argument 251 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, in invokeAny() argument
|
/libcore/dalvik/src/main/java/dalvik/system/ |
D | ZygoteHooks.java | 240 File tasks = new File("/proc/self/task"); in waitUntilAllThreadsStopped() local 243 while (tasks.list().length > 1) { in waitUntilAllThreadsStopped()
|
/libcore/ |
D | NativeCode.bp | 219 // platform_testing/build/tasks/tests/native_test_list.mk. 246 // platform_testing/build/tasks/tests/native_metric_test_list.mk.
|
/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()
|