Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for callAsync (0.16 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      }
    
      public void testWhenAllComplete_callAsync_cancelledPipeline() throws Exception {
        ClosingFuture<TestCloseable> closingFuture =
            ClosingFuture.whenAllComplete(
                    ImmutableList.of(
                        ClosingFuture.from(immediateFuture(closeable1)),
                        ClosingFuture.eventuallyClosing(immediateFuture(closeable2), closingExecutor)))
                .callAsync(
                    waiter.waitFor(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 74.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      }
    
      public void testWhenAllComplete_callAsync_cancelledPipeline() throws Exception {
        ClosingFuture<TestCloseable> closingFuture =
            ClosingFuture.whenAllComplete(
                    ImmutableList.of(
                        ClosingFuture.from(immediateFuture(closeable1)),
                        ClosingFuture.eventuallyClosing(immediateFuture(closeable2), closingExecutor)))
                .callAsync(
                    waiter.waitFor(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AsyncCallable.java

    import java.util.concurrent.Future;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Computes a value, possibly asynchronously. For an example usage and more information, see {@link
     * 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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Dec 14 15:53:12 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

         */
        public <V extends @Nullable Object> ClosingFuture<V> callAsync(
            final AsyncCombiningCallable<V> combiningCallable, Executor executor) {
          AsyncCallable<V> asyncCallable =
              new AsyncCallable<V>() {
                @Override
                public ListenableFuture<V> call() throws Exception {
                  return new Peeker(inputs).callAsync(combiningCallable, closeables);
                }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

              @Override
              public ListenableFuture<String> call() throws Exception {
                return stringFuture;
              }
            };
    
        ListenableFuture<String> futureResult = whenAllComplete().callAsync(combiner, directExecutor());
    
        assertThat(Thread.interrupted()).isFalse();
        futureResult.cancel(true);
        assertThat(Thread.interrupted()).isFalse();
      }
    
      @J2ktIncompatible // Wildcard generics
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

              @Override
              public ListenableFuture<String> call() throws Exception {
                return stringFuture;
              }
            };
    
        ListenableFuture<String> futureResult = whenAllComplete().callAsync(combiner, directExecutor());
    
        assertThat(Thread.interrupted()).isFalse();
        futureResult.cancel(true);
        assertThat(Thread.interrupted()).isFalse();
      }
    
      @J2ktIncompatible // Wildcard generics
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

         * handleAllCompleted(), they will already have been nulled out. But in the case of
         * whenAll*().call*(), this future may be pending until the callback runs -- or even longer in
         * the case of callAsync(), which waits for the callback's returned future to complete.
         */
        releaseResources(ALL_INPUT_FUTURES_PROCESSED);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Futures.java

         *     href="https://errorprone.info/bugpattern/FutureReturnValueIgnored">https://errorprone.info/bugpattern/FutureReturnValueIgnored</a>.
         */
        public <C extends @Nullable Object> ListenableFuture<C> callAsync(
            AsyncCallable<C> combiner, Executor executor) {
          return new CombinedFuture<>(futures, allMustSucceed, executor, combiner);
        }
    
        /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
Back to top