Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 31 for immediateFuture (0.11 sec)

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

    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.getDone;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static com.google.common.util.concurrent.ReflectionFreeAssertThrows.assertThrows;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

        // oldFuture completes.
        Runnable listener =
            () -> {
              if (taskFuture.isDone()) {
                // Since the value of oldFuture can only ever be immediateFuture(null) or setFuture of
                // a future that eventually came from immediateFuture(null), this doesn't leak
                // throwables or completion values.
                newFuture.setFuture(oldFuture);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 01 21:46:34 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/Futures.java

          @ParametricNullness V value) {
        if (value == null) {
          // This cast is safe because null is assignable to V for all V (i.e. it is bivariant)
          @SuppressWarnings("unchecked")
          ListenableFuture<V> typedNull = (ListenableFuture<V>) ImmediateFuture.NULL;
          return typedNull;
        }
        return new ImmediateFuture<>(value);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

          checkNotNull(
              replacement,
              "AsyncFunction.apply returned null instead of a Future. "
                  + "Did you mean to return immediateFuture(null)? %s",
              fallback);
          return replacement;
        }
    
        @Override
        void setResult(ListenableFuture<? extends V> result) {
          setFuture(result);
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

    import static com.google.common.util.concurrent.Futures.immediateCancelledFuture;
    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/FluentFuture.java

       * // counters.
       * ListenableFuture<Integer> faultTolerantFuture =
       *     fetchCounters().catchingAsync(
       *         FetchException.class, x -> immediateFuture(0), directExecutor());
       * }</pre>
       *
       * <p>The fallback can also choose to propagate the original exception when desired:
       *
       * <pre>{@code
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

          checkNotNull(
              outputFuture,
              "AsyncFunction.apply returned null instead of a Future. "
                  + "Did you mean to return immediateFuture(null)? %s",
              function);
          return outputFuture;
        }
    
        @Override
        void setResult(ListenableFuture<? extends O> result) {
          setFuture(result);
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static java.util.Arrays.asList;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java

            notifyAndClearListeners();
            return;
          }
    
          /*
           * Almost everything in GWT is an AbstractFuture (which is as good as TrustedFuture under
           * GWT). But ImmediateFuture and UncheckedThrowingFuture aren't, so we still need this case.
           */
          try {
            forceSet(getDone(delegate));
          } catch (ExecutionException exception) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 19:37:41 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/LocalCache.java

                return newValue;
              }
              try {
                return getAndRecordStats(key, hash, computingValueReference, immediateFuture(newValue));
              } catch (ExecutionException exception) {
                throw new AssertionError("impossible; Futures.immediateFuture can't throw");
              }
            } else if (createNewEntry || valueReference.isLoading()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 149.2K bytes
    - Viewed (0)
Back to top