/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | AbstractExecutorService.java | 160 ArrayList<Future<T>> futures = new ArrayList<>(ntasks); in doInvokeAny() local 178 futures.add(ecs.submit(it.next())); in doInvokeAny() 187 futures.add(ecs.submit(it.next())); in doInvokeAny() 218 cancelAll(futures); in doInvokeAny() 242 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll() local 246 futures.add(f); in invokeAll() 249 for (int i = 0, size = futures.size(); i < size; i++) { in invokeAll() 250 Future<T> f = futures.get(i); in invokeAll() 256 return futures; in invokeAll() 258 cancelAll(futures); in invokeAll() [all …]
|
D | ForkJoinPool.java | 2725 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); 2730 futures.add(f); 2733 for (int i = futures.size() - 1; i >= 0; --i) 2734 ((ForkJoinTask<?>)futures.get(i)).awaitPoolInvoke(this); 2735 return futures; 2737 for (Future<T> e : futures) 2748 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); 2753 futures.add(f); 2758 for (int i = futures.size() - 1; i >= 0; --i) { 2759 Future<T> f = futures.get(i); [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | AbstractExecutorServiceTest.java | 388 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 389 assertEquals(1, futures.size()); in testInvokeAll4() 391 futures.get(0).get(); in testInvokeAll4() 408 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 409 assertEquals(2, futures.size()); in testInvokeAll5() 410 for (Future<String> future : futures) in testInvokeAll5() 572 List<Future<String>> futures = 574 assertEquals(1, futures.size()); 576 futures.get(0).get(); 593 List<Future<String>> futures = [all …]
|
D | ExecutorCompletionService9Test.java | 79 List<Future<Integer>> futures = new ArrayList<>(n); in solveAny() local 82 solvers.forEach(solver -> futures.add(cs.submit(solver))); in solveAny() 93 futures.forEach(future -> future.cancel(true)); in solveAny()
|
D | ScheduledExecutorSubclassTest.java | 1066 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1067 assertEquals(1, futures.size()); in testInvokeAll4() 1069 futures.get(0).get(); in testInvokeAll4() 1086 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1087 assertEquals(2, futures.size()); in testInvokeAll5() 1088 for (Future<String> future : futures) in testInvokeAll5() 1250 List<Future<String>> futures = 1252 assertEquals(1, futures.size()); 1254 futures.get(0).get(); 1271 List<Future<String>> futures = [all …]
|
D | ScheduledExecutorTest.java | 1014 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1015 assertEquals(1, futures.size()); in testInvokeAll4() 1017 futures.get(0).get(); in testInvokeAll4() 1034 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1035 assertEquals(2, futures.size()); in testInvokeAll5() 1036 for (Future<String> future : futures) in testInvokeAll5() 1199 List<Future<String>> futures = 1201 assertEquals(1, futures.size()); 1203 futures.get(0).get(); 1220 List<Future<String>> futures = [all …]
|
D | ThreadPoolExecutorTest.java | 1646 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1647 assertEquals(1, futures.size()); in testInvokeAll4() 1649 futures.get(0).get(); in testInvokeAll4() 1669 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1670 assertEquals(2, futures.size()); in testInvokeAll5() 1671 for (Future<String> future : futures) in testInvokeAll5() 1868 List<Future<String>> futures = 1870 assertEquals(1, futures.size()); 1872 futures.get(0).get(); 1892 List<Future<String>> futures = [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 1644 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1645 assertEquals(1, futures.size()); in testInvokeAll4() 1647 futures.get(0).get(); in testInvokeAll4() 1667 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1668 assertEquals(2, futures.size()); in testInvokeAll5() 1669 for (Future<String> future : futures) in testInvokeAll5() 1866 List<Future<String>> futures = 1868 assertEquals(1, futures.size()); 1870 futures.get(0).get(); 1890 List<Future<String>> futures = [all …]
|
D | ForkJoinPoolTest.java | 770 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 771 assertEquals(1, futures.size()); in testInvokeAll4() 773 futures.get(0).get(); in testInvokeAll4() 790 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 791 assertEquals(2, futures.size()); in testInvokeAll5() 792 for (Future<String> future : futures) in testInvokeAll5() 957 List<Future<String>> futures 959 assertEquals(1, futures.size()); 961 futures.get(0).get(); 978 List<Future<String>> futures [all …]
|
D | StampedLockTest.java | 336 Future<?>[] futures = new Future<?>[n]; in assertThrowInterruptedExceptionWhenInterrupted() local 342 futures[i] = cachedThreadPool.submit(new CheckedRunnable() { in assertThrowInterruptedExceptionWhenInterrupted() 358 for (Future<?> future : futures) // Interrupt all the tasks in assertThrowInterruptedExceptionWhenInterrupted() 623 ArrayList<Future<?>> futures = new ArrayList<>(); in testTimedLock_Timeout() local 637 futures.add(cachedThreadPool.submit(new CheckedRunnable() { in testTimedLock_Timeout() 644 futures.add(cachedThreadPool.submit(new CheckedRunnable() { in testTimedLock_Timeout() 659 futures.add(cachedThreadPool.submit(new CheckedRunnable() { in testTimedLock_Timeout() 666 for (Future<?> future : futures) in testTimedLock_Timeout()
|
D | FutureTaskTest.java | 848 final List<Future<?>> futures = new ArrayList<>(); in testGet_NegativeInfinityTimeout() local 857 futures.add(pool.submit(r)); in testGet_NegativeInfinityTimeout() 860 for (Future<?> future : futures) in testGet_NegativeInfinityTimeout()
|
D | Collection8Test.java | 814 final List<Future<?>> futures; 861 futures = tasks.stream() 867 for (Future future : futures)
|
D | JSR166TestCase.java | 1074 ArrayList<Future<?>> futures = new ArrayList<>(actions.length); 1076 futures.add(pool.submit(new CheckedRunnable() { 1078 for (Future<?> future : futures)
|
D | CompletableFutureTest.java | 3592 List<CompletableFuture<?>> futures = new ArrayList<>(); in testRejectingExecutor() local 3622 futures.addAll(fs); in testRejectingExecutor() 3639 futures.addAll(fs); in testRejectingExecutor() 3656 futures.addAll(fs); in testRejectingExecutor() 3661 for (CompletableFuture<?> future : futures) in testRejectingExecutor() 3664 mustEqual(futures.size(), e.count.get()); in testRejectingExecutor()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AbstractExecutorServiceTest.java | 365 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 366 assertEquals(1, futures.size()); in testInvokeAll4() 368 futures.get(0).get(); in testInvokeAll4() 385 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 386 assertEquals(2, futures.size()); in testInvokeAll5() 387 for (Future<String> future : futures) in testInvokeAll5() 549 List<Future<String>> futures = 551 assertEquals(1, futures.size()); 553 futures.get(0).get(); 570 List<Future<String>> futures = [all …]
|
D | ScheduledExecutorSubclassTest.java | 1039 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1040 assertEquals(1, futures.size()); in testInvokeAll4() 1042 futures.get(0).get(); in testInvokeAll4() 1059 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1060 assertEquals(2, futures.size()); in testInvokeAll5() 1061 for (Future<String> future : futures) in testInvokeAll5() 1223 List<Future<String>> futures = 1225 assertEquals(1, futures.size()); 1227 futures.get(0).get(); 1244 List<Future<String>> futures = [all …]
|
D | ScheduledExecutorTest.java | 988 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 989 assertEquals(1, futures.size()); in testInvokeAll4() 991 futures.get(0).get(); in testInvokeAll4() 1008 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1009 assertEquals(2, futures.size()); in testInvokeAll5() 1010 for (Future<String> future : futures) in testInvokeAll5() 1173 List<Future<String>> futures = 1175 assertEquals(1, futures.size()); 1177 futures.get(0).get(); 1194 List<Future<String>> futures = [all …]
|
D | ThreadPoolExecutorTest.java | 1629 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1630 assertEquals(1, futures.size()); in testInvokeAll4() 1632 futures.get(0).get(); in testInvokeAll4() 1652 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1653 assertEquals(2, futures.size()); in testInvokeAll5() 1654 for (Future<String> future : futures) in testInvokeAll5() 1851 List<Future<String>> futures = 1853 assertEquals(1, futures.size()); 1855 futures.get(0).get(); 1875 List<Future<String>> futures = [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 1622 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 1623 assertEquals(1, futures.size()); in testInvokeAll4() 1625 futures.get(0).get(); in testInvokeAll4() 1645 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 1646 assertEquals(2, futures.size()); in testInvokeAll5() 1647 for (Future<String> future : futures) in testInvokeAll5() 1844 List<Future<String>> futures = 1846 assertEquals(1, futures.size()); 1848 futures.get(0).get(); 1868 List<Future<String>> futures = [all …]
|
D | ForkJoinPoolTest.java | 752 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local 753 assertEquals(1, futures.size()); in testInvokeAll4() 755 futures.get(0).get(); in testInvokeAll4() 772 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local 773 assertEquals(2, futures.size()); in testInvokeAll5() 774 for (Future<String> future : futures) in testInvokeAll5() 939 List<Future<String>> futures 941 assertEquals(1, futures.size()); 943 futures.get(0).get(); 960 List<Future<String>> futures [all …]
|
D | FutureTaskTest.java | 825 final List<Future<?>> futures = new ArrayList<>(); in testGet_NegativeInfinityTimeout() local 834 futures.add(pool.submit(r)); in testGet_NegativeInfinityTimeout() 837 for (Future<?> future : futures) in testGet_NegativeInfinityTimeout()
|
D | JSR166TestCase.java | 939 ArrayList<Future<?>> futures = new ArrayList<>(actions.length); 941 futures.add(pool.submit(new CheckedRunnable() { 943 for (Future<?> future : futures)
|