Home
last modified time | relevance | path

Searched refs:futures (Results 1 – 10 of 10) 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 …]
DForkJoinPool.java2839 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll() local
2844 futures.add(f); in invokeAll()
2847 for (int i = 0, size = futures.size(); i < size; i++) in invokeAll()
2848 ((ForkJoinTask<?>)futures.get(i)).quietlyJoin(); in invokeAll()
2849 return futures; in invokeAll()
2851 for (int i = 0, size = futures.size(); i < size; i++) in invokeAll()
2852 futures.get(i).cancel(false); in invokeAll()
/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 …]
DThreadPoolExecutorSubclassTest.java1622 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 …]
DForkJoinPoolTest.java752 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 …]
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)