Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for setFuture (0.06 sec)

  1. 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
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  2. 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);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  3. 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
    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/src/com/google/common/util/concurrent/TrustedListenableFutureTask.java

      }
    
      @Override
      public void run() {
        InterruptibleTask<?> localTask = task;
        if (localTask != null) {
          localTask.run();
        }
        /*
         * In the Async case, we may have called setFuture(pendingFuture), in which case afterDone()
         * won't have been called yet.
         */
        this.task = null;
      }
    
      @Override
      protected void afterDone() {
        super.afterDone();
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

                executor.execute(runnable);
              }
            };
        Future<?> future = newFutureInstance();
        future
            .getClass()
            .getMethod(
                "setFuture",
                future.getClass().getClassLoader().loadClass(ListenableFuture.class.getName()))
            .invoke(future, badFuture);
        CancellationException expected = assertThrows(CancellationException.class, () -> future.get());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

                executor.execute(runnable);
              }
            };
        Future<?> future = newFutureInstance();
        future
            .getClass()
            .getMethod(
                "setFuture",
                future.getClass().getClassLoader().loadClass(ListenableFuture.class.getName()))
            .invoke(future, badFuture);
        CancellationException expected = assertThrows(CancellationException.class, () -> future.get());
    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. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

            () -> {
              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);
              } else if (outputFuture.isCancelled() && taskExecutor.trySetCancelled()) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Futures.java

        public void run() {
          // This prevents cancellation from propagating because we don't call setFuture(delegate) until
          // delegate is already done, so calling cancel() on this future won't affect it.
          @RetainedLocalRef ListenableFuture<V> localDelegate = delegate;
          if (localDelegate != null) {
            setFuture(localDelegate);
          }
        }
    
        @Override
        protected @Nullable String pendingToString() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java

       *   <li>{@link Cancellation} terminal state, {@code cancel} was called.
       *   <li>{@link Failure} terminal state, {@code setException} was called.
       *   <li>{@link DelegatingToFuture} intermediate state, {@code setFuture} was called.
       *   <li>{@link #NULL} terminal state, {@code set(null)} was called.
       *   <li>Any other non-null value, terminal state, {@code set} was called with a non-null
       *       argument.
       * </ul>
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/AbstractFutureState.java

       *   <li>{@link Cancellation} terminal state, {@code cancel} was called.
       *   <li>{@link Failure} terminal state, {@code setException} was called.
       *   <li>{@link DelegatingToFuture} intermediate state, {@code setFuture} was called.
       *   <li>{@link #NULL} terminal state, {@code set(null)} was called.
       *   <li>Any other non-null value, terminal state, {@code set} was called with a non-null
       *       argument.
       * </ul>
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
Back to top