Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for SettableFuture (0.13 sec)

  1. guava/src/com/google/common/util/concurrent/SettableFuture.java

     */
    @GwtCompatible
    public final class SettableFuture<V extends @Nullable Object>
        extends AbstractFuture.TrustedFuture<V> {
      /**
       * Creates a new {@code SettableFuture} that can be completed or cancelled by a later method call.
       */
      public static <V extends @Nullable Object> SettableFuture<V> create() {
        return new SettableFuture<>();
      }
    
      @CanIgnoreReturnValue
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/SettableFuture.java

     */
    @GwtCompatible
    public final class SettableFuture<V extends @Nullable Object>
        extends AbstractFuture.TrustedFuture<V> {
      /**
       * Creates a new {@code SettableFuture} that can be completed or cancelled by a later method call.
       */
      public static <V extends @Nullable Object> SettableFuture<V> create() {
        return new SettableFuture<>();
      }
    
      @CanIgnoreReturnValue
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

      // together.  Now it should only be limited by available memory (and time)
      public void testSetFuture_stackOverflow() {
        SettableFuture<String> orig = SettableFuture.create();
        SettableFuture<String> prev = orig;
        for (int i = 0; i < 100000; i++) {
          SettableFuture<String> curr = SettableFuture.create();
          prev.setFuture(curr);
          prev = curr;
        }
        // prev represents the 'innermost' future
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

      public void testSameThreadSuccess() {
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        SettableFuture<String> future = SettableFuture.create();
        SettableFuture<String> nested = SettableFuture.create();
        assertTrue(future.setFuture(nested));
        // Later attempts to set the future should return false.
        assertFalse(future.set("x"));
        assertFalse(future.setException(new Exception("bar")));
        assertFalse(future.setFuture(SettableFuture.<String>create()));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

      private Class<?> settableFutureClass;
      private Class<?> abstractFutureClass;
    
      @Override
      protected void setUp() throws Exception {
        // Load the "normal" copy of SettableFuture and related classes.
        SettableFuture<?> unused = SettableFuture.create();
        // Hack to load AbstractFuture et. al. in a new classloader so that it re-reads the cancellation
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

      private Class<?> settableFutureClass;
      private Class<?> abstractFutureClass;
    
      @Override
      protected void setUp() throws Exception {
        // Load the "normal" copy of SettableFuture and related classes.
        SettableFuture<?> unused = SettableFuture.create();
        // Hack to load AbstractFuture et. al. in a new classloader so that it re-reads the cancellation
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

      // together.  Now it should only be limited by available memory (and time)
      public void testSetFuture_stackOverflow() {
        SettableFuture<String> orig = SettableFuture.create();
        SettableFuture<String> prev = orig;
        for (int i = 0; i < 100000; i++) {
          SettableFuture<String> curr = SettableFuture.create();
          prev.setFuture(curr);
          prev = curr;
        }
        // prev represents the 'innermost' future
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        WeakReference<Object> ref = new WeakReference<>(toBeGCed);
        SettableFuture<@Nullable Void> settableFuture = SettableFuture.create();
        ListenableFuture<?> ignored =
            serializer.submitAsync(
                new AsyncCallable<@Nullable Void>() {
                  @Override
                  public ListenableFuture<@Nullable Void> call() {
                    return settableFuture;
                  }
                },
                directExecutor());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 20:58:01 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

      public void testSameThreadSuccess() {
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 6.7K bytes
    - Viewed (0)
Back to top