/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | FutureTask.java | 103 private Callable<V> callable; field in FutureTask 133 public FutureTask(Callable<V> callable) { in FutureTask() argument 134 if (callable == null) in FutureTask() 136 this.callable = callable; in FutureTask() 153 this.callable = Executors.callable(runnable, result); in FutureTask() 261 Callable<V> c = callable; in run() 304 Callable<V> c = callable; in runAndReset() 385 callable = null; // to reduce footprint in finishCompletion()
|
D | Executors.java | 381 public static <T> Callable<T> callable(Runnable task, T result) { in callable() method in Executors 394 public static Callable<Object> callable(Runnable task) { in callable() method in Executors 407 public static Callable<Object> callable(final PrivilegedAction<?> action) { in callable() method in Executors 422 public static Callable<Object> callable(final PrivilegedExceptionAction<?> action) { 433 public static <T> Callable<T> privilegedCallable(Callable<T> callable) { 434 if (callable == null) 436 return new PrivilegedCallable<T>(callable); 443 public static <T> Callable<T> privilegedCallableUsingCurrentClassLoader(Callable<T> callable) { 444 if (callable == null) 446 return new PrivilegedCallableUsingCurrentClassLoader<T>(callable); [all …]
|
D | ScheduledThreadPoolExecutor.java | 232 ScheduledFutureTask(Callable<V> callable, long triggerTime, in ScheduledFutureTask() argument 234 super(callable); in ScheduledFutureTask() 425 Callable<V> callable, RunnableScheduledFuture<V> task) { in decorateTask() argument 570 public <V> ScheduledFuture<V> schedule(Callable<V> callable, in schedule() argument 573 if (callable == null || unit == null) in schedule() 575 RunnableScheduledFuture<V> t = decorateTask(callable, in schedule() 576 new ScheduledFutureTask<V>(callable, in schedule() 672 return schedule(Executors.callable(task, result), 0, NANOSECONDS); in submit()
|
D | ScheduledExecutorService.java | 126 public <V> ScheduledFuture<V> schedule(Callable<V> callable, in schedule() argument
|
D | ForkJoinTask.java | 1423 final Callable<? extends T> callable; field in ForkJoinTask.AdaptedCallable 1425 AdaptedCallable(Callable<? extends T> callable) { in AdaptedCallable() argument 1426 if (callable == null) throw new NullPointerException(); in AdaptedCallable() 1427 this.callable = callable; in AdaptedCallable() 1433 result = callable.call(); in exec() 1481 public static <T> ForkJoinTask<T> adapt(Callable<? extends T> callable) { in adapt() argument 1482 return new AdaptedCallable<T>(callable); in adapt()
|
D | AbstractExecutorService.java | 107 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) { in newTaskFor() argument 108 return new FutureTask<T>(callable); in newTaskFor()
|
D | ForkJoinPool.java | 3458 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) { in newTaskFor() argument 3459 return new ForkJoinTask.AdaptedCallable<T>(callable); in newTaskFor()
|
/libcore/luni/src/test/java/libcore/sun/misc/ |
D | UnsafeTest.java | 42 Callable<Object> callable = Executors.callable(new Runnable() { in test_getUnsafeForbiddenWithSystemCaller() local 49 callable.call(); in test_getUnsafeForbiddenWithSystemCaller()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ExecutorsTest.java | 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() 532 Callable c = Executors.callable(new NoOpRunnable()); in testCallable1() 540 Callable c = Executors.callable(new NoOpRunnable(), one); in testCallable2() 548 Callable c = Executors.callable(new PrivilegedAction() { in testCallable3() 557 Callable c = Executors.callable(new PrivilegedExceptionAction() { in testCallable4() 567 Callable c = Executors.callable((Runnable) null); in testCallableNPE1() 577 Callable c = Executors.callable((Runnable) null, one); in testCallableNPE2() 587 Callable c = Executors.callable((PrivilegedAction) null); in testCallableNPE3() [all …]
|
D | ForkJoinPoolTest.java | 485 final Callable callable = Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction() local 491 Future future = e.submit(callable); in testSubmitPrivilegedAction() 503 final Callable callable = in testSubmitPrivilegedExceptionAction() local 504 Executors.callable(new PrivilegedExceptionAction() { in testSubmitPrivilegedExceptionAction() 510 Future future = e.submit(callable); in testSubmitPrivilegedExceptionAction() 522 final Callable callable = in testSubmitFailedPrivilegedExceptionAction() local 523 Executors.callable(new PrivilegedExceptionAction() { in testSubmitFailedPrivilegedExceptionAction() 529 Future future = e.submit(callable); in testSubmitFailedPrivilegedExceptionAction()
|
D | FutureTaskTest.java | 196 PublicFutureTask(Callable callable) { in PublicFutureTask() argument 197 this(callable, new AtomicInteger(0)); in PublicFutureTask() 199 private PublicFutureTask(final Callable callable, in PublicFutureTask() argument 204 return callable.call(); in PublicFutureTask() 633 final Callable<Object> callable = in testTimedGet_Cancellation() local 646 final PublicFutureTask task = new PublicFutureTask(callable); in testTimedGet_Cancellation()
|
D | AbstractExecutorServiceTest.java | 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() 587 tasks.add(Executors.callable(possiblyInterruptedRunnable(timeout),
|
D | ThreadPoolExecutorSubclassTest.java | 54 final Callable<V> callable; field in ThreadPoolExecutorSubclassTest.CustomTask 64 callable = c; in CustomTask() 68 callable = new Callable<V>() { in CustomTask() 102 v = callable.call(); in run()
|
D | ScheduledExecutorTest.java | 248 TrackedCallable callable = null; in testScheduleNull() local 249 Future f = p.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
|
D | ScheduledExecutorSubclassTest.java | 304 TrackedCallable callable = null; in testScheduleNull() local 305 Future f = p.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
|
D | ThreadPoolExecutorTest.java | 1121 p.submit(Executors.callable(task)); in testSaturatedSubmitCallable()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | LambdaImplementationTest.java | 152 Callable<String> callable = (Callable<String> & Serializable) () -> "No State"; in testSerializableLambda_withoutState() local 153 assertLambdaImplementsInterfaces(callable, Callable.class, Serializable.class); in testSerializableLambda_withoutState() 154 callables.add(callable); in testSerializableLambda_withoutState() 175 Callable<String> callable = (Callable<String> & Serializable) () -> "State:" + state; in testSerializableLambda_withState() local 176 assertLambdaImplementsInterfaces(callable, Callable.class, Serializable.class); in testSerializableLambda_withState() 177 callables.add(callable); in testSerializableLambda_withState() 209 Callable<String> callable = in testMultipleInterfaceLambda() local 211 assertLambdaImplementsInterfaces(callable, Callable.class, MarkerInterface.class); in testMultipleInterfaceLambda() 212 callables.add(callable); in testMultipleInterfaceLambda()
|
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/ |
D | Executors.java | 120 public static <T> java.util.concurrent.Callable<T> callable(java.lang.Runnable task, T result) { in callable() method in Executors 124 public static java.util.concurrent.Callable<java.lang.Object> callable( in callable() method in Executors 129 public static java.util.concurrent.Callable<java.lang.Object> callable( in callable() method in Executors 134 public static java.util.concurrent.Callable<java.lang.Object> callable( in callable() method in Executors 140 java.util.concurrent.Callable<T> callable) { in privilegedCallable() argument 145 java.util.concurrent.Callable<T> callable) { in privilegedCallableUsingCurrentClassLoader() argument 282 java.util.concurrent.Callable<V> callable, in schedule() argument
|
D | FutureTask.java | 43 public FutureTask(java.util.concurrent.Callable<V> callable) { in FutureTask() argument 153 private java.util.concurrent.Callable<V> callable; field in FutureTask
|
/libcore/luni/src/test/java/libcore/libcore/net/ |
D | NetworkSecurityPolicyTest.java | 258 Callable<byte[]> callable = () -> { in CapturingServerSocket() local 280 mFirstChunkReceivedFuture = executor.submit(callable); in CapturingServerSocket()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | URLTest.java | 189 private static void withCustomURLStreamHandlerFactory(Callable<Void> callable) in withCustomURLStreamHandlerFactory() argument 197 callable.call(); in withCustomURLStreamHandlerFactory()
|