Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for ImmediateFuture (0.65 sec)

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

              }
            };
    
        // Since holder.value is 2, applying 4 should yield 6.
        assertEquals(6, adder.apply(4).intValue());
    
        ListenableFuture<Integer> immediateFuture = immediateFuture(4);
        Future<Integer> transformedFuture = transform(immediateFuture, adder, directExecutor());
    
        // The composed future also yields 6.
        assertEquals(6, getDone(transformedFuture).intValue());
    
    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)
  2. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        TestCallable secondCallable = new TestCallable(Futures.<Void>immediateFuture(null));
        ListenableFuture<@Nullable Void> secondFuture =
            serializer.submitAsync(secondCallable, directExecutor());
        TestCallable thirdCallable = new TestCallable(Futures.<Void>immediateFuture(null));
        @SuppressWarnings({"unused", "nullness"})
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        TestCallable secondCallable = new TestCallable(Futures.<Void>immediateFuture(null));
        ListenableFuture<@Nullable Void> secondFuture =
            serializer.submitAsync(secondCallable, directExecutor());
        TestCallable thirdCallable = new TestCallable(Futures.<Void>immediateFuture(null));
        @SuppressWarnings({"unused", "nullness"})
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  4. 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);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  5. android/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);
      }
    
      /**
    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)
  6. 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.Runnables.doNothing;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  7. 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.Runnables.doNothing;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/CombinedFuture.java

          ListenableFuture<V> result = callable.call();
          return checkNotNull(
              result,
              "AsyncCallable.call returned null instead of a Future. "
                  + "Did you mean to return immediateFuture(null)? %s",
              callable);
        }
    
        @Override
        void setValue(ListenableFuture<V> value) {
          CombinedFuture.this.setFuture(value);
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  9. 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);
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  10. 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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 19:37:41 GMT 2024
    - 12.3K bytes
    - Viewed (0)
Back to top