Home
last modified time | relevance | path

Searched refs:Future (Results 1 – 25 of 30) sorted by relevance

12

/libcore/luni/src/main/java/java/util/concurrent/
DCompletionService.java44 Future<V> submit(Callable<V> task); in submit()
60 Future<V> submit(Runnable task, V result); in submit()
69 Future<V> take() throws InterruptedException; in take()
78 Future<V> poll(); in poll()
94 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll()
DExecutorCompletionService.java81 private final BlockingQueue<Future<V>> completionQueue;
92 private final Future<V> task;
123 this.completionQueue = new LinkedBlockingQueue<Future<V>>(); in ExecutorCompletionService()
140 BlockingQueue<Future<V>> completionQueue) { in ExecutorCompletionService()
149 public Future<V> submit(Callable<V> task) { in submit()
156 public Future<V> submit(Runnable task, V result) { in submit()
163 public Future<V> take() throws InterruptedException { in take()
167 public Future<V> poll() { in poll()
171 public Future<V> poll(long timeout, TimeUnit unit) in poll()
DAbstractExecutorService.java78 public Future<?> submit(Runnable task) { in submit()
89 public <T> Future<T> submit(Runnable task, T result) { in submit()
100 public <T> Future<T> submit(Callable<T> task) { in submit()
118 ArrayList<Future<T>> futures = new ArrayList<Future<T>>(ntasks); in doInvokeAny()
141 Future<T> f = ecs.poll(); in doInvokeAny()
197 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
201 ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size()); in invokeAll()
210 Future<T> f = futures.get(i); in invokeAll()
228 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll()
234 ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size()); in invokeAll()
[all …]
DExecutorService.java195 <T> Future<T> submit(Callable<T> task); in submit()
209 <T> Future<T> submit(Runnable task, T result); in submit()
222 Future<?> submit(Runnable task); in submit()
244 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
274 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll()
DScheduledFuture.java18 public interface ScheduledFuture<V> extends Delayed, Future<V> {
DRunnableFuture.java19 public interface RunnableFuture<V> extends Runnable, Future<V> {
DFuture.java67 public interface Future<V> { interface
DExecutors.java592 public Future<?> submit(Runnable task) {
595 public <T> Future<T> submit(Callable<T> task) {
598 public <T> Future<T> submit(Runnable task, T result) {
601 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
605 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,
DThreadPoolExecutor.java1737 if (r instanceof Future<?> && ((Future<?>)r).isCancelled()) in purge()
1745 if (r instanceof Future<?> && ((Future<?>)r).isCancelled()) in purge()
DScheduledThreadPoolExecutor.java601 public Future<?> submit(Runnable task) { in submit()
609 public <T> Future<T> submit(Runnable task, T result) { in submit()
617 public <T> Future<T> submit(Callable<T> task) { in submit()
/libcore/jsr166-tests/src/test/java/jsr166/
DExecutorCompletionServiceTest.java18 import java.util.concurrent.Future;
91 Future f = ecs.take(); in testTake()
106 Future f1 = ecs.submit(c); in testTake2()
107 Future f2 = ecs.take(); in testTake2()
126 Future f; in testPoll1()
149 Future f = ecs.poll(SHORT_DELAY_MS, MILLISECONDS); in testPoll2()
178 Future f1 = ecs.submit(c); in testNewTaskForCallable()
181 Future f2 = ecs.take(); in testNewTaskForCallable()
210 Future f1 = ecs.submit(r, null); in testNewTaskForRunnable()
213 Future f2 = ecs.take(); in testNewTaskForRunnable()
DAbstractExecutorServiceTest.java49 Future<?> future = e.submit(task); in testExecuteRunnable()
62 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
72 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
82 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
94 Future future = e.submit(Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction()
115 Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() { in testSubmitPrivilegedExceptionAction()
133 Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() { in testSubmitFailedPrivilegedExceptionAction()
187 Future<Void> future = p.submit(awaiter); in testInterruptedSubmit()
322 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
354 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
[all …]
DForkJoinPoolTest.java18 import java.util.concurrent.Future;
217 Future<String> future = p.submit(new StringTask()); in testGetPoolSize()
421 Future<?> future = e.submit(task); in testExecuteRunnable()
438 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
453 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
468 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
487 Future future = e.submit(callable); in testSubmitPrivilegedAction()
508 Future future = e.submit(callable); in testSubmitPrivilegedExceptionAction()
529 Future future = e.submit(callable); in testSubmitFailedPrivilegedExceptionAction()
550 Future<?> future = e.submit((Runnable) null); in testExecuteNullRunnable()
[all …]
DScheduledExecutorTest.java51 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
73 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
190 Future f = se.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
750 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
764 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
778 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
886 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
917 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
938 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5()
940 for (Future<String> future : futures) in testInvokeAll5()
[all …]
DScheduledExecutorSubclassTest.java103 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
125 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
240 Future f = se.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
799 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
813 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
827 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
935 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
966 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
987 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5()
989 for (Future<String> future : futures) in testInvokeAll5()
[all …]
DFutureTaskTest.java16 import java.util.concurrent.Future;
26 void checkIsDone(Future<?> f) { in checkIsDone()
64 void checkNotDone(Future<?> f) { in checkNotDone()
75 void checkIsRunning(Future<?> f) { in checkIsRunning()
92 <T> void checkCompletedNormally(Future<T> f, T expected) { in checkCompletedNormally()
104 void checkCancelled(Future<?> f) { in checkCancelled()
129 void checkCompletedAbnormally(Future<?> f, Throwable t) { in checkCompletedAbnormally()
DThreadPoolExecutorTest.java1398 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
1415 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
1432 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
1561 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
1599 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
1624 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5()
1626 for (Future<String> future : futures) in testInvokeAll5()
1792 …List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, MILLISECO… in testTimedInvokeAll2()
1829 List<Future<String>> futures = in testTimedInvokeAll4()
1854 List<Future<String>> futures = in testTimedInvokeAll5()
[all …]
DExecutorsTest.java182 Future f = p.schedule(Executors.callable(task, Boolean.TRUE), in testNewSingleThreadScheduledExecutor()
208 Future f = p.schedule(Executors.callable(task, Boolean.TRUE), in testNewScheduledThreadPool()
236 Future f = p.schedule(Executors.callable(task, Boolean.TRUE), in testUnconfigurableScheduledExecutorService()
271 Future future = executor.submit(sleeper); in testTimedCallable()
DThreadPoolExecutorSubclassTest.java1268 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
1282 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
1296 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
1404 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
1435 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
1456 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5()
1458 for (Future<String> future : futures) in testInvokeAll5()
1597 …List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, MILLISECO… in testTimedInvokeAll2()
1628 List<Future<String>> futures = in testTimedInvokeAll4()
1650 List<Future<String>> futures = in testTimedInvokeAll5()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_Exec.java33 import java.util.concurrent.Future;
87 Future<String> errFuture = executorService.submit( in execAndGetOutput()
89 Future<String> outFuture = executorService.submit( in execAndGetOutput()
127 Future<String> errFuture = in execAndCheckOutput()
129 Future<String> outFuture = in execAndCheckOutput()
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLSocketPair.java23 import java.util.concurrent.Future;
80 Future s = executor.submit(new Callable<Void>() { in connect()
89 Future c = executor.submit(new Callable<Void>() { in connect()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSocketTest.java41 import java.util.concurrent.Future;
320 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake()
377 final Future<byte[]> future1 = executor.submit(new SSLServerSessionIdCallable(server1)); in test_SSLSocket_confirmSessionReuse()
390 final Future<byte[]> future2 = executor.submit(new SSLServerSessionIdCallable(server2)); in test_SSLSocket_confirmSessionReuse()
413 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noKeyStore()
443 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noClientCertificate()
463 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener()
585 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener_RuntimeException()
651 Future<IOException> future = executor.submit(new Callable<IOException>() { in test_SSLSocket_setUseClientMode()
705 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_untrustedServer()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DOutputStreamTesterTest.java43 import java.util.concurrent.Future;
117 private Future<byte[]> future;
DWriterTesterTest.java42 import java.util.concurrent.Future;
110 private Future<char[]> future;
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCopyOnWriteArrayListTest.java29 import java.util.concurrent.Future;
180 Future<?> future = executor.submit(new Runnable() { in testAddAllIsAtomic()

12