Home
last modified time | relevance | path

Searched refs:futures (Results 1 – 13 of 13) sorted by relevance

/libcore/ojluni/src/main/java/java/util/concurrent/
DAbstractExecutorService.java155 ArrayList<Future<T>> futures = new ArrayList<>(ntasks); in doInvokeAny() local
173 futures.add(ecs.submit(it.next())); in doInvokeAny()
182 futures.add(ecs.submit(it.next())); in doInvokeAny()
213 cancelAll(futures); in doInvokeAny()
237 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll() local
241 futures.add(f); in invokeAll()
244 for (int i = 0, size = futures.size(); i < size; i++) { in invokeAll()
245 Future<T> f = futures.get(i); in invokeAll()
252 return futures; in invokeAll()
254 cancelAll(futures); in invokeAll()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DAbstractExecutorServiceTest.java388 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 …]
DExecutorCompletionService9Test.java79 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()
DScheduledExecutorTest.java1009 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4() local
1010 assertEquals(1, futures.size()); in testInvokeAll4()
1012 futures.get(0).get(); in testInvokeAll4()
1029 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5() local
1030 assertEquals(2, futures.size()); in testInvokeAll5()
1031 for (Future<String> future : futures) in testInvokeAll5()
1194 List<Future<String>> futures =
1196 assertEquals(1, futures.size());
1198 futures.get(0).get();
1215 List<Future<String>> futures =
[all …]
DForkJoinPoolTest.java770 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 …]
DCollection8Test.java814 final List<Future<?>> futures;
861 futures = tasks.stream()
867 for (Future future : futures)
DJSR166TestCase.java1034 ArrayList<Future<?>> futures = new ArrayList<>(actions.length);
1036 futures.add(pool.submit(new CheckedRunnable() {
1038 for (Future<?> future : futures)
/libcore/jsr166-tests/src/test/java/jsr166/
DAbstractExecutorServiceTest.java365 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 …]
DScheduledExecutorTest.java988 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 …]
DScheduledExecutorSubclassTest.java1039 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 …]
DThreadPoolExecutorTest.java1629 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 …]
DFutureTaskTest.java825 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()
DJSR166TestCase.java939 ArrayList<Future<?>> futures = new ArrayList<>(actions.length);
941 futures.add(pool.submit(new CheckedRunnable() {
943 for (Future<?> future : futures)