Home
last modified time | relevance | path

Searched refs:callable (Results 1 – 18 of 18) sorted by relevance

/libcore/luni/src/main/java/java/util/concurrent/
DFutureTask.java73 private Callable<V> callable; field in FutureTask
103 public FutureTask(Callable<V> callable) { in FutureTask() argument
104 if (callable == null) in FutureTask()
106 this.callable = callable; in FutureTask()
123 this.callable = Executors.callable(runnable, result); in FutureTask()
232 Callable<V> c = callable; in run()
276 Callable<V> c = callable; in runAndReset()
357 callable = null; // to reduce footprint in finishCompletion()
DExecutors.java343 public static <T> Callable<T> callable(Runnable task, T result) { in callable() method in Executors
356 public static Callable<Object> callable(Runnable task) { in callable() method in Executors
369 public static Callable<Object> callable(final PrivilegedAction<?> action) { in callable() method in Executors
384 public static Callable<Object> callable(final PrivilegedExceptionAction<?> action) {
394 public static <T> Callable<T> privilegedCallable(Callable<T> callable) {
395 if (callable == null)
397 return new PrivilegedCallable<T>(callable);
403 public static <T> Callable<T> privilegedCallableUsingCurrentClassLoader(Callable<T> callable) {
404 if (callable == null)
406 return new PrivilegedCallableUsingCurrentClassLoader<T>(callable);
[all …]
DScheduledExecutorService.java96 public <V> ScheduledFuture<V> schedule(Callable<V> callable, in schedule() argument
DScheduledThreadPoolExecutor.java200 ScheduledFutureTask(Callable<V> callable, long ns) { in ScheduledFutureTask() argument
201 super(callable); in ScheduledFutureTask()
387 Callable<V> callable, RunnableScheduledFuture<V> task) { in decorateTask() argument
511 public <V> ScheduledFuture<V> schedule(Callable<V> callable, in schedule() argument
514 if (callable == null || unit == null) in schedule()
516 RunnableScheduledFuture<V> t = decorateTask(callable, in schedule()
517 new ScheduledFutureTask<V>(callable, in schedule()
610 return schedule(Executors.callable(task, result), 0, NANOSECONDS); in submit()
DForkJoinTask.java1404 final Callable<? extends T> callable; field in ForkJoinTask.AdaptedCallable
1406 AdaptedCallable(Callable<? extends T> callable) { in AdaptedCallable() argument
1407 if (callable == null) throw new NullPointerException(); in AdaptedCallable()
1408 this.callable = callable; in AdaptedCallable()
1414 result = callable.call(); in exec()
1462 public static <T> ForkJoinTask<T> adapt(Callable<? extends T> callable) { in adapt() argument
1463 return new AdaptedCallable<T>(callable); in adapt()
DAbstractExecutorService.java70 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) { in newTaskFor() argument
71 return new FutureTask<T>(callable); in newTaskFor()
DForkJoinPool.java3190 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) { in newTaskFor() argument
3191 return new ForkJoinTask.AdaptedCallable<T>(callable); in newTaskFor()
/libcore/luni/src/test/java/sun/misc/
DUnsafeTest.java40 Callable<Object> callable = Executors.callable(new Runnable() { in test_getUnsafeForbiddenWithSystemCaller() local
47 callable.call(); in test_getUnsafeForbiddenWithSystemCaller()
/libcore/jsr166-tests/src/test/java/jsr166/
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()
515 Callable c = Executors.callable(new NoOpRunnable()); in testCallable1()
523 Callable c = Executors.callable(new NoOpRunnable(), one); in testCallable2()
531 Callable c = Executors.callable(new PrivilegedAction() { in testCallable3()
540 Callable c = Executors.callable(new PrivilegedExceptionAction() { in testCallable4()
550 Callable c = Executors.callable((Runnable) null); in testCallableNPE1()
560 Callable c = Executors.callable((Runnable) null, one); in testCallableNPE2()
570 Callable c = Executors.callable((PrivilegedAction) null); in testCallableNPE3()
[all …]
DForkJoinPoolTest.java481 final Callable callable = Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction() local
487 Future future = e.submit(callable); in testSubmitPrivilegedAction()
501 final Callable callable = in testSubmitPrivilegedExceptionAction() local
502 Executors.callable(new PrivilegedExceptionAction() { in testSubmitPrivilegedExceptionAction()
508 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()
DFutureTaskTest.java178 PublicFutureTask(Callable callable) { in PublicFutureTask() argument
179 this(callable, new AtomicInteger(0)); in PublicFutureTask()
181 private PublicFutureTask(final Callable callable, in PublicFutureTask() argument
186 return callable.call(); in PublicFutureTask()
615 final Callable<Object> callable = in testTimedGet_Cancellation() local
628 final PublicFutureTask task = new PublicFutureTask(callable); in testTimedGet_Cancellation()
DAbstractExecutorServiceTest.java94 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()
589 l.add(Executors.callable(possiblyInterruptedRunnable(2 * SHORT_DELAY_MS), TEST_STRING)); in testTimedInvokeAll6()
DThreadPoolExecutorSubclassTest.java21 final Callable<V> callable; field in ThreadPoolExecutorSubclassTest.CustomTask
31 callable = c; in CustomTask()
35 callable = new Callable<V>() { in CustomTask()
69 v = callable.call(); in run()
1668 l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING)); in testTimedInvokeAll6()
DScheduledExecutorTest.java189 TrackedCallable callable = null; in testScheduleNull() local
190 Future f = se.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
1150 l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING)); in testTimedInvokeAll6()
DScheduledExecutorSubclassTest.java239 TrackedCallable callable = null; in testScheduleNull() local
240 Future f = se.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
1199 l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING)); in testTimedInvokeAll6()
DThreadPoolExecutorTest.java1096 p.submit(Executors.callable(task)); in testSaturatedSubmitCallable()
1875 l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING)); in testTimedInvokeAll6()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLContextTest.java402 Provider provider, Callable<T> callable) throws Exception { in invokeWithHighestPrioritySecurityProvider() argument
407 return callable.call(); in invokeWithHighestPrioritySecurityProvider()
/libcore/support/src/test/java/tests/resources/
Djunit4-4.3.1.jarMETA-INF/ META-INF/MANIFEST.MF junit/ junit/extensions/ junit/ ...