Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for setFuture (0.25 sec)

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

        assertCancelled(future, true);
      }
    
      public void testSetFuturePending() throws Exception {
        assertThat(future.setFuture(delegate)).isTrue();
        assertSetAsynchronously(future);
      }
    
      public void testSetFutureThenCancel() throws Exception {
        assertThat(future.setFuture(delegate)).isTrue();
        assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, false);
    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)
  2. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

           * succeeded.
           */
          set(uncheckedCastNullableTToT(sourceResult));
          return;
        }
    
        if (!isInstanceOfThrowableClass(throwable, localExceptionType)) {
          setFuture(localInputFuture);
          // TODO(cpovirk): Test that fallback is not run in this case.
          return;
        }
    
        @SuppressWarnings("unchecked") // verified safe by isInstanceOfThrowableClass
    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)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

            // cancellation can interleave in 3 ways
            // 1. prior to setFuture
            // 2. after setFuture before set() on the future assigned
            // 3. after setFuture and set() are called but before the listener completes.
            if (!setFutureSetSuccess.get() || !setFutureCompletionSuccess.get()) {
              // If setFuture fails or set on the future fails then it must be because that future was
              // cancelled
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/SettableFuture.java

      @Override
      public boolean setException(Throwable throwable) {
        return super.setException(throwable);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setFuture(ListenableFuture<? extends V> future) {
        return super.setFuture(future);
      }
    
      private SettableFuture() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertCancelled(future, true);
      }
    
      public void testSetFuturePending() throws Exception {
        assertThat(future.setFuture(delegate)).isTrue();
        assertSetAsynchronously(future);
      }
    
      public void testSetFutureThenCancel() throws Exception {
        assertThat(future.setFuture(delegate)).isTrue();
        assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, false);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java

                "RuntimeException while executing runnable " + command + " with executor " + executor,
                e);
          }
        }
      }
    
      private final class SetFuture implements Runnable {
        final ListenableFuture<? extends V> delegate;
    
        SetFuture(ListenableFuture<? extends V> delegate) {
          this.delegate = delegate;
        }
    
        @Override
        public void run() {
          if (isCancelled()) {
    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)
  7. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        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()));
        // Check that the future has been set properly.
        assertFalse(future.isDone());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (1)
  8. android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        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()));
        // Check that the future has been set properly.
        assertFalse(future.isDone());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

            if (task instanceof SetFuture) {
              SetFuture<?> setFuture = (SetFuture<?>) task;
              // We unwind setFuture specifically to avoid StackOverflowErrors in the case of long
              // chains of SetFutures
              // Handling this special case is important because there is no way to pass an executor to
              // setFuture, so a user couldn't break the chain by doing this themselves.  It is also
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

            // cancellation can interleave in 3 ways
            // 1. prior to setFuture
            // 2. after setFuture before set() on the future assigned
            // 3. after setFuture and set() are called but before the listener completes.
            if (!setFutureSetSuccess.get() || !setFutureCompletionSuccess.get()) {
              // If setFuture fails or set on the future fails then it must be because that future was
              // cancelled
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
Back to top