Home
last modified time | relevance | path

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

123

/libcore/ojluni/src/main/java/java/util/concurrent/
DExecutorCompletionService.java109 private final BlockingQueue<Future<V>> completionQueue;
116 BlockingQueue<Future<V>> completionQueue) { in QueueingFuture()
121 private final Future<V> task;
122 private final BlockingQueue<Future<V>> completionQueue;
154 this.completionQueue = new LinkedBlockingQueue<Future<V>>(); in ExecutorCompletionService()
171 BlockingQueue<Future<V>> completionQueue) { in ExecutorCompletionService()
180 public Future<V> submit(Callable<V> task) { in submit()
187 public Future<V> submit(Runnable task, V result) { in submit()
194 public Future<V> take() throws InterruptedException { in take()
198 public Future<V> poll() { in poll()
[all …]
DCompletionService.java73 Future<V> submit(Callable<V> task); in submit()
89 Future<V> submit(Runnable task, V result); in submit()
98 Future<V> take() throws InterruptedException; in take()
107 Future<V> poll(); in poll()
123 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll()
DAbstractExecutorService.java115 public Future<?> submit(Runnable task) { in submit()
126 public <T> Future<T> submit(Runnable task, T result) { in submit()
137 public <T> Future<T> submit(Callable<T> task) { in submit()
155 ArrayList<Future<T>> futures = new ArrayList<>(ntasks); in doInvokeAny()
178 Future<T> f = ecs.poll(); in doInvokeAny()
233 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
237 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll()
245 Future<T> f = futures.get(i); in invokeAll()
259 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll()
266 ArrayList<Future<T>> futures = new ArrayList<>(tasks.size()); in invokeAll()
[all …]
DScheduledFuture.java47 public interface ScheduledFuture<V> extends Delayed, Future<V> {
DRunnableFuture.java48 public interface RunnableFuture<V> extends Runnable, Future<V> {
DFuture.java97 public interface Future<V> { interface
/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 …]
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 …]
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 …]
/libcore/ojluni/src/main/java/java/nio/channels/
DAsynchronousByteChannel.java29 import java.util.concurrent.Future;
136 Future<Integer> read(ByteBuffer dst); in read()
212 Future<Integer> write(ByteBuffer src); in write()
DAsynchronousFileChannel.java33 import java.util.concurrent.Future;
532 public abstract Future<FileLock> lock(long position, long size, boolean shared); in lock()
556 public final Future<FileLock> lock() { in lock()
711 public abstract Future<Integer> read(ByteBuffer dst, long position); in read()
778 public abstract Future<Integer> write(ByteBuffer src, long position); in write()
DAsynchronousServerSocketChannel.java31 import java.util.concurrent.Future;
306 public abstract Future<AsynchronousSocketChannel> accept(); in accept()
DAsynchronousChannel.java29 import java.util.concurrent.Future; // javadoc
/libcore/ojluni/src/main/java/sun/nio/ch/
DAsynchronousFileChannelImpl.java31 import java.util.concurrent.Future;
106 abstract <A> Future<FileLock> implLock(long position, in implLock()
113 public final Future<FileLock> lock(long position, in lock()
211 abstract <A> Future<Integer> implRead(ByteBuffer dst, in implRead()
217 public final Future<Integer> read(ByteBuffer dst, long position) { in read()
232 abstract <A> Future<Integer> implWrite(ByteBuffer src, in implWrite()
239 public final Future<Integer> write(ByteBuffer src, long position) { in write()
DCompletedFuture.java28 import java.util.concurrent.Future;
38 final class CompletedFuture<V> implements Future<V> {
DPendingFuture.java37 final class PendingFuture<V,A> implements Future<V> {
54 private Future<?> timeoutTask;
107 void setTimeoutTask(Future<?> task) { in setTimeoutTask()
DAsynchronousSocketChannelImpl.java193 abstract <A> Future<Void> implConnect(SocketAddress remote, in implConnect()
198 public final Future<Void> connect(SocketAddress remote) { in connect()
215 abstract <V extends Number,A> Future<V> implRead(boolean isScatteringRead, in implRead()
224 private <V extends Number,A> Future<V> read(boolean isScatteringRead, in read()
280 public final Future<Integer> read(ByteBuffer dst) { in read()
324 abstract <V extends Number,A> Future<V> implWrite(boolean isGatheringWrite, in implWrite()
333 private <V extends Number,A> Future<V> write(boolean isGatheringWrite, in write()
386 public final Future<Integer> write(ByteBuffer src) { in write()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DExecutorCompletionServiceTest.java46 import java.util.concurrent.Future;
113 Future f = cs.take(); in testTake()
123 Future f1 = cs.submit(new StringTask()); in testTake2()
124 Future f2 = cs.take(); in testTake2()
138 Future f; in testPoll1()
158 Future f; in testPoll2()
239 Future f1 = cs.submit(c); in testNewTaskForCallable()
242 Future f2 = cs.take(); in testNewTaskForCallable()
269 Future f1 = cs.submit(r, null); in testNewTaskForRunnable()
272 Future f2 = cs.take(); in testNewTaskForRunnable()
DAbstractExecutorServiceTest.java52 import java.util.concurrent.Future;
93 Future<?> future = e.submit(new CheckedRunnable() { in testExecuteRunnable()
109 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
119 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
129 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
141 Future future = e.submit(Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction()
162 Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() { in testSubmitPrivilegedExceptionAction()
180 Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() { in testSubmitFailedPrivilegedExceptionAction()
234 Future<Void> future = p.submit(awaiter); in testInterruptedSubmit()
359 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2()
[all …]
DForkJoinPoolTest.java51 import java.util.concurrent.Future;
250 Future<?> future = p.submit(task); in testGetPoolSize()
448 Future<?> future = e.submit(new CheckedRunnable() { in testExecuteRunnable()
466 Future<String> future = e.submit(new StringTask()); in testSubmitCallable()
479 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable()
492 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2()
509 Future future = e.submit(callable); in testSubmitPrivilegedAction()
528 Future future = e.submit(callable); in testSubmitPrivilegedExceptionAction()
547 Future future = e.submit(callable); in testSubmitFailedPrivilegedExceptionAction()
567 Future<?> future = e.submit((Runnable) null); in testExecuteNullRunnable()
[all …]
DScheduledExecutorTest.java50 import java.util.concurrent.Future;
99 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
119 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
271 Future f = p.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
796 List<Future<?>> blockers = new ArrayList<>(); in testShutdown_cancellation()
797 List<Future<?>> periodics = new ArrayList<>(); in testShutdown_cancellation()
798 List<Future<?>> delayeds = new ArrayList<>(); in testShutdown_cancellation()
814 for (Future<?> periodic : periodics) { in testShutdown_cancellation()
818 for (Future<?> delayed : delayeds) { in testShutdown_cancellation()
831 for (Future<?> delayed : delayeds) { in testShutdown_cancellation()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/channels/
DChannelsTest.java29 import java.util.concurrent.Future;
76 Future<Integer> result = mock(Future.class); in testInputStreamAsynchronousByteChannel()
104 Future<Integer> result = mock(Future.class); in testOutputStreamAsynchronousByteChannel()
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLSocketPair.java22 import java.util.concurrent.Future;
79 Future s = executor.submit(new Callable<Void>() { in connect()
88 Future c = executor.submit(new Callable<Void>() { in connect()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DAbstractExecutorServiceTest.java26 import java.util.concurrent.Future;
76 Future<Integer> future = service.submit(() -> didRun.set(true), value); in testSubmitRunnableWithValue()

123