Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 385 for Futures (0.16 sec)

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

              }
    
              @Override
              public void onFailure(Throwable t) {
                failureCalls[0]++;
              }
            };
        addCallback(future, callback, directExecutor());
        future.set(result);
        assertEquals(result, future.get());
        assertThat(successCalls[0]).isEqualTo(1);
        assertThat(failureCalls[0]).isEqualTo(0);
      }
    
      public void testOnSuccessThrowsError() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Nov 15 16:33:21 GMT 2022
    - 6.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

     * limitations under the License.
     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.transformAsync;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
    import static org.junit.Assert.assertThrows;
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/package-info.java

     * the License.
     */
    
    /**
     * Concurrency utilities.
     *
     * <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link
     * Service}.
     *
     * <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link
     * ThreadFactoryBuilder}, and {@link Uninterruptibles}.
     *
     * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
     * library.
     */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

        try {
          sourceResult = getDone(localInputFuture);
        } catch (CancellationException e) {
          // TODO(user): verify future behavior - unify logic with getFutureValue in AbstractFuture. This
          // code should be unreachable with correctly implemented Futures.
          // Cancel this future and return.
          // At this point, inputFuture is cancelled and outputFuture doesn't exist, so the value of
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/CacheLoader.java

       *     the thread's interrupt status is set
       * @since 11.0
       */
      @GwtIncompatible // Futures
      public ListenableFuture<V> reload(K key, V oldValue) throws Exception {
        checkNotNull(key);
        checkNotNull(oldValue);
        return Futures.immediateFuture(load(key));
      }
    
      /**
       * Computes or retrieves the values corresponding to {@code keys}. This method is called by {@link
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java

      static final Future<String> FAILED_FUTURE_OTHER_THROWABLE =
          immediateFailedFuture(OTHER_THROWABLE);
      static final Error ERROR = new Error("mymessage");
      static final Future<String> FAILED_FUTURE_ERROR = immediateFailedFuture(ERROR);
      static final Future<String> RUNTIME_EXCEPTION_FUTURE =
          UncheckedThrowingFuture.throwingRuntimeException(RUNTIME_EXCEPTION);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 13:46:56 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

      /**
       * Do interruptible work here - do not complete Futures here, as their listeners could be
       * interrupted.
       */
      @ParametricNullness
      abstract T runInterruptibly() throws Exception;
    
      /**
       * Any interruption that happens as a result of calling interruptTask will arrive before this
       * method is called. Complete Futures here.
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 29 21:34:48 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

              }
    
              @Override
              public void onFailure(Throwable t) {
                failureCalls[0]++;
              }
            };
        addCallback(future, callback, directExecutor());
        future.set(result);
        assertEquals(result, future.get());
        assertThat(successCalls[0]).isEqualTo(1);
        assertThat(failureCalls[0]).isEqualTo(0);
      }
    
      public void testOnSuccessThrowsError() throws Exception {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    
    /**
     * Unit tests for any listenable future that chains other listenable futures. Unit tests need only
     * override buildChainingFuture and getSuccessfulResult, but they can add custom tests as needed.
     *
     * @author Nishant Thakkar
     */
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AggregateFutureState.java

    abstract class AggregateFutureState<OutputT extends @Nullable Object>
        extends AbstractFuture.TrustedFuture<OutputT> {
      // Lazily initialized the first time we see an exception; not released until all the input futures
      // & this future completes. Released when the future releases the reference to the running state
      private @Nullable Set<Throwable> seenExceptions = null;
      private int remaining;
    
      AggregateFutureState(int remainingFutures) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 08 20:30:27 GMT 2022
    - 1.7K bytes
    - Viewed (0)
Back to top