Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for ImmediateFuture (0.09 sec)

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

            ClosingFuture.whenAllSucceed(
                    ClosingFuture.eventuallyClosing(immediateFuture(closeable1), closingExecutor),
                    ClosingFuture.from(immediateFuture("value2")),
                    ClosingFuture.from(immediateFuture("value3")),
                    ClosingFuture.from(immediateFuture("value4")),
                    ClosingFuture.from(immediateFuture("value5")))
                .call(
                    new ClosingFunction5<
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 75.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        ListenableFuture<String> f =
            new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {};
        verify(!(f instanceof FluentFuture));
        assertThat(FluentFuture.from(f).get()).isEqualTo("a");
        // TODO(cpovirk): Test forwarding more extensively.
      }
    
      public void testAddCallback() {
        FluentFuture<String> f = FluentFuture.from(immediateFuture("a"));
        boolean[] called = new boolean[1];
        f.addCallback(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

      public void testGetUnchecked_success() {
        assertEquals("foo", getUnchecked(immediateFuture("foo")));
      }
    
      @J2ktIncompatible
      @GwtIncompatible // Thread.interrupt
      public void testGetUnchecked_interrupted() {
        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

      public void testGetUnchecked_success() {
        assertEquals("foo", getUnchecked(immediateFuture("foo")));
      }
    
      @J2ktIncompatible
      @GwtIncompatible // Thread.interrupt
      public void testGetUnchecked_interrupted() {
        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/util/concurrent/FuturesGetCheckedBenchmark.java

    import static com.google.common.base.Preconditions.checkArgument;
    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.FuturesGetChecked.checkExceptionClassValidity;
    import static com.google.common.util.concurrent.FuturesGetChecked.getChecked;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  6. 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"})
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 20:58:01 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheLoaderTest.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.ImmutableMap;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.ArrayDeque;
    import java.util.Deque;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

     *       {@link AbstractFuture}.)
     * </ul>
     *
     * <p><b>Test doubles</b>: If you need a {@code ListenableFuture} for your test, try a {@link
     * SettableFuture} or one of the methods in the {@link Futures#immediateFuture Futures.immediate*}
     * family. <b>Avoid</b> creating a mock or stub {@code Future}. Mock and stub implementations are
     * fragile because they assume that only certain methods will be called and because they often
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 8K bytes
    - Viewed (0)
  9. 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);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
  10. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 22.1K bytes
    - Viewed (0)
Back to top