Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for AsyncCallable (0.19 seconds)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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);
        }
    
        @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 6.8K bytes
    - Click Count (0)
Back to Top