- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for AsyncCallable (0.09 seconds)
-
android/guava/src/com/google/common/util/concurrent/AsyncCallable.java
* Futures.FutureCombiner#callAsync(AsyncCallable, java.util.concurrent.Executor)}. * * <p>Much like {@link java.util.concurrent.Callable}, but returning a {@link ListenableFuture} * result. * * @since 20.0 */ @GwtCompatible public interface AsyncCallable<V extends @Nullable Object> { /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 1.5K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/Callables.java
return () -> value; } /** * Creates an {@link AsyncCallable} from a {@link Callable}. * * <p>The {@link AsyncCallable} returns the {@link ListenableFuture} resulting from {@link * ListeningExecutorService#submit(Callable)}. * * @since 20.0 */ @J2ktIncompatible @GwtIncompatible public static <T extends @Nullable Object> AsyncCallable<T> asAsyncCallable(
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 4.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
String expected = "MyCallableString"; Callable<String> callable = () -> expected; AsyncCallable<String> asyncCallable = Callables.asAsyncCallable(callable, newDirectExecutorService()); ListenableFuture<String> future = asyncCallable.call(); assertThat(future.get()).isEqualTo(expected); } @J2ktIncompatible @GwtIncompatible
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
String expected = "MyCallableString"; Callable<String> callable = () -> expected; AsyncCallable<String> asyncCallable = Callables.asAsyncCallable(callable, newDirectExecutorService()); ListenableFuture<String> future = asyncCallable.call(); assertThat(future.get()).isEqualTo(expected); } @J2ktIncompatible @GwtIncompatible
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
* callable} or a callable that has begun to execute, but if the output future is cancelled before * {@link AsyncCallable#call()} is invoked, {@link AsyncCallable#call()} will not be invoked. */ public <T extends @Nullable Object> ListenableFuture<T> submitAsync( AsyncCallable<T> callable, Executor executor) { checkNotNull(callable); checkNotNull(executor);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 23 01:35:55 GMT 2025 - 22.1K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/TrustedListenableFutureTask.java
} } @WeakOuter private final class TrustedFutureInterruptibleAsyncTask extends InterruptibleTask<ListenableFuture<V>> { private final AsyncCallable<V> callable; TrustedFutureInterruptibleAsyncTask(AsyncCallable<V> callable) { this.callable = checkNotNull(callable); } @Override final boolean isDone() { return TrustedListenableFutureTask.this.isDone();Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Jul 11 18:52:30 GMT 2025 - 5.5K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/CombinedFuture.java
} @WeakOuter private final class AsyncCallableInterruptibleTask extends CombinedFutureInterruptibleTask<ListenableFuture<V>> { private final AsyncCallable<V> callable; AsyncCallableInterruptibleTask(AsyncCallable<V> callable, Executor listenerExecutor) { super(listenerExecutor); this.callable = checkNotNull(callable); } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 6.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
@SuppressWarnings("AnonymousToLambda") // We want an instance that can be GCed. AsyncCallable<Long> combiner = new AsyncCallable<Long>() { @Override public ListenableFuture<Long> call() { return SettableFuture.create(); } }; WeakReference<AsyncCallable<Long>> combinerRef = new WeakReference<>(combiner); ListenableFuture<Long> unused =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 134K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
@SuppressWarnings("AnonymousToLambda") // We want an instance that can be GCed. AsyncCallable<Long> combiner = new AsyncCallable<Long>() { @Override public ListenableFuture<Long> call() { return SettableFuture.create(); } }; WeakReference<AsyncCallable<Long>> combinerRef = new WeakReference<>(combiner); ListenableFuture<Long> unused =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 134K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
* * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ public static <O extends @Nullable Object> ListenableFuture<O> submitAsync( AsyncCallable<O> callable, Executor executor) { TrustedListenableFutureTask<O> task = TrustedListenableFutureTask.create(callable); executor.execute(task); return task; } /**
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 19:26:39 GMT 2026 - 64.2K bytes - Click Count (0)