Home
last modified time | relevance | path

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

12

/libcore/luni/src/main/java/java/util/concurrent/
DExecutorCompletionService.java80 private final BlockingQueue<Future<V>> completionQueue;
87 BlockingQueue<Future<V>> completionQueue) { in QueueingFuture()
92 private final Future<V> task;
93 private final BlockingQueue<Future<V>> completionQueue;
125 this.completionQueue = new LinkedBlockingQueue<Future<V>>(); in ExecutorCompletionService()
142 BlockingQueue<Future<V>> completionQueue) { in ExecutorCompletionService()
151 public Future<V> submit(Callable<V> task) { in submit()
158 public Future<V> submit(Runnable task, V result) { in submit()
165 public Future<V> take() throws InterruptedException { in take()
169 public Future<V> poll() { in poll()
[all …]
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()
DExecutorService.java197 <T> Future<T> submit(Callable<T> task); in submit()
212 <T> Future<T> submit(Runnable task, T result); in submit()
225 Future<?> submit(Runnable task); in submit()
248 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
279 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll()
DAbstractExecutorService.java86 public Future<?> submit(Runnable task) { in submit()
97 public <T> Future<T> submit(Runnable task, T result) { in submit()
108 public <T> Future<T> submit(Callable<T> task) { in submit()
126 ArrayList<Future<T>> futures = new ArrayList<>(ntasks); in doInvokeAny()
149 Future<T> f = ecs.poll(); in doInvokeAny()
204 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
208 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll()
216 Future<T> f = futures.get(i); in invokeAll()
230 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll()
237 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll()
[all …]
DScheduledFuture.java18 public interface ScheduledFuture<V> extends Delayed, Future<V> {
DRunnableFuture.java19 public interface RunnableFuture<V> extends Runnable, Future<V> {
DFuture.java68 public interface Future<V> { interface
DExecutors.java600 public Future<?> submit(Runnable task) {
603 public <T> Future<T> submit(Callable<T> task) {
606 public <T> Future<T> submit(Runnable task, T result) {
609 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
613 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,
/libcore/jsr166-tests/src/test/java/jsr166/
DExecutorCompletionServiceTest.java18 import java.util.concurrent.Future;
99 Future f = ecs.take(); in testTake()
112 Future f1 = ecs.submit(c); in testTake2()
113 Future f2 = ecs.take(); in testTake2()
130 Future f; in testPoll1()
151 Future f = ecs.poll(SHORT_DELAY_MS, MILLISECONDS); in testPoll2()
179 Future f1 = ecs.submit(c); in testNewTaskForCallable()
182 Future f2 = ecs.take(); in testNewTaskForCallable()
210 Future f1 = ecs.submit(r, null); in testNewTaskForRunnable()
213 Future f2 = ecs.take(); in testNewTaskForRunnable()
DAbstractExecutorServiceTest.java26 import java.util.concurrent.Future;
70 Future<?> future = e.submit(new CheckedRunnable() { in testExecuteRunnable()
86 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
96 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
106 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
118 Future future = e.submit(Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction()
139 Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() { in testSubmitPrivilegedExceptionAction()
157 Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() { in testSubmitFailedPrivilegedExceptionAction()
211 Future<Void> future = p.submit(awaiter); in testInterruptedSubmit()
336 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
[all …]
DForkJoinPoolTest.java25 import java.util.concurrent.Future;
232 Future<?> future = p.submit(task); in testGetPoolSize()
430 Future<?> future = e.submit(new CheckedRunnable() { in testExecuteRunnable()
448 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
461 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
474 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
491 Future future = e.submit(callable); in testSubmitPrivilegedAction()
510 Future future = e.submit(callable); in testSubmitPrivilegedExceptionAction()
529 Future future = e.submit(callable); in testSubmitFailedPrivilegedExceptionAction()
549 Future<?> future = e.submit((Runnable) null); in testExecuteNullRunnable()
[all …]
DScheduledExecutorSubclassTest.java24 import java.util.concurrent.Future;
134 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
153 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
305 Future f = p.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
826 List<Future<?>> blockers = new ArrayList<>(); in testShutdown_cancellation()
827 List<Future<?>> periodics = new ArrayList<>(); in testShutdown_cancellation()
828 List<Future<?>> delayeds = new ArrayList<>(); in testShutdown_cancellation()
844 for (Future<?> periodic : periodics) { in testShutdown_cancellation()
848 for (Future<?> delayed : delayeds) { in testShutdown_cancellation()
861 for (Future<?> delayed : delayeds) { in testShutdown_cancellation()
[all …]
DScheduledExecutorTest.java25 import java.util.concurrent.Future;
77 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
97 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
249 Future f = p.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
775 List<Future<?>> blockers = new ArrayList<>(); in testShutdown_cancellation()
776 List<Future<?>> periodics = new ArrayList<>(); in testShutdown_cancellation()
777 List<Future<?>> delayeds = new ArrayList<>(); in testShutdown_cancellation()
793 for (Future<?> periodic : periodics) { in testShutdown_cancellation()
797 for (Future<?> delayed : delayeds) { in testShutdown_cancellation()
810 for (Future<?> delayed : delayeds) { in testShutdown_cancellation()
[all …]
DCollection8Test.java18 import java.util.concurrent.Future;
81 final Future<?> f1, f2; in testForEachConcurrentStressTest()
DFutureTaskTest.java24 import java.util.concurrent.Future;
44 void checkIsDone(Future<?> f) { in checkIsDone()
82 void checkNotDone(Future<?> f) { in checkNotDone()
93 void checkIsRunning(Future<?> f) { in checkIsRunning()
110 <T> void checkCompletedNormally(Future<T> f, T expected) { in checkCompletedNormally()
122 void checkCancelled(Future<?> f) { in checkCancelled()
147 void checkCompletedAbnormally(Future<?> f, Throwable t) { in checkCompletedAbnormally()
825 final List<Future<?>> futures = new ArrayList<>(); in testGet_NegativeInfinityTimeout()
837 for (Future<?> future : futures) in testGet_NegativeInfinityTimeout()
DExecutorsTest.java24 import java.util.concurrent.Future;
211 Future f = p.schedule(Executors.callable(task, Boolean.TRUE), in testNewSingleThreadScheduledExecutor()
235 Future f = p.schedule(Executors.callable(task, Boolean.TRUE), in testNewScheduledThreadPool()
261 Future f = p.schedule(Executors.callable(task, Boolean.TRUE), in testUnconfigurableScheduledExecutorService()
293 Future future = executor.submit(sleeper); in testTimedCallable()
DThreadPoolExecutorSubclassTest.java24 import java.util.concurrent.Future;
1436 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
1451 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
1466 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
1587 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
1622 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
1645 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5()
1647 for (Future<String> future : futures) in testInvokeAll5()
1808 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(),
1844 List<Future<String>> futures =
[all …]
DThreadPoolExecutorTest.java25 import java.util.concurrent.Future;
1443 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
1458 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
1473 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
1594 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
1629 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll4()
1652 List<Future<String>> futures = e.invokeAll(l); in testInvokeAll5()
1654 for (Future<String> future : futures) in testInvokeAll5()
1815 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(),
1851 List<Future<String>> futures =
[all …]
DJSR166TestCase.java46 import java.util.concurrent.Future;
939 ArrayList<Future<?>> futures = new ArrayList<>(actions.length);
943 for (Future<?> future : futures)
1026 void assertFutureTimesOut(Future future) {
1033 void assertFutureTimesOut(Future future, long timeoutMillis) {
1264 <T> void checkTimedGet(Future<T> f, T expectedValue, long timeoutMillis) {
1273 <T> void checkTimedGet(Future<T> f, T expectedValue) {
/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/ojluni/src/main/java/sun/nio/ch/
DCompletedFuture.java28 import java.util.concurrent.Future;
38 final class CompletedFuture<V> implements Future<V> {
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSocketTest.java47 import java.util.concurrent.Future;
350 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake()
408 final Future<byte[]> future1 = executor.submit(new SSLServerSessionIdCallable(server1)); in test_SSLSocket_confirmSessionReuse()
421 final Future<byte[]> future2 = executor.submit(new SSLServerSessionIdCallable(server2)); in test_SSLSocket_confirmSessionReuse()
445 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_NoEnabledCipherSuites_Failure()
475 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noKeyStore()
505 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noClientCertificate()
525 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener()
648 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener_RuntimeException()
714 Future<IOException> future = executor.submit(new Callable<IOException>() { in test_SSLSocket_setUseClientMode()
[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;

12