Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for isCancelled (0.11 sec)

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

        assertTrue(task.isDone());
        assertFalse(task.isCancelled());
        assertEquals(2, getDone(task).intValue());
      }
    
      public void testCancelled() throws Exception {
        TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create(returning(2));
        assertFalse(task.isDone());
        task.cancel(false);
        assertTrue(task.isDone());
        assertTrue(task.isCancelled());
        assertFalse(task.wasInterrupted());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertCannotSet(future);
        assertPending(future);
      }
    
      private static void assertPending(AbstractFuture<Integer> future) {
        assertThat(future.isDone()).isFalse();
        assertThat(future.isCancelled()).isFalse();
    
        CountingRunnable listener = new CountingRunnable();
        future.addListener(listener, directExecutor());
        listener.assertNotRun();
    
        verifyGetOnPendingFuture(future);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertCannotSet(future);
        assertPending(future);
      }
    
      private static void assertPending(AbstractFuture<Integer> future) {
        assertThat(future.isDone()).isFalse();
        assertThat(future.isCancelled()).isFalse();
    
        CountingRunnable listener = new CountingRunnable();
        future.addListener(listener, directExecutor());
        listener.assertNotRun();
    
        verifyGetOnPendingFuture(future);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

        super.afterDone();
    
        @RetainedLocalRef ImmutableCollection<? extends Future<?>> localFutures = futures;
        releaseResources(OUTPUT_FUTURE_DONE); // nulls out `futures`
    
        if (isCancelled() & localFutures != null) {
          boolean wasInterrupted = wasInterrupted();
          for (Future<?> future : localFutures) {
            future.cancel(wasInterrupted);
          }
        }
        /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

        public void cancel(boolean mayInterruptIfRunning) {
          delegate.cancel(mayInterruptIfRunning);
        }
    
        @Override
        public boolean isCancelled() {
          return delegate.isCancelled();
        }
      }
    
      /**
       * A {@link Scheduler} that provides a convenient way for the {@link AbstractScheduledService} to
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 16:22:21 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

        @RetainedLocalRef ListenableFuture<? extends I> localInputFuture = inputFuture;
        @RetainedLocalRef F localFunction = function;
        if (isCancelled() | localInputFuture == null | localFunction == null) {
          return;
        }
        inputFuture = null;
    
        if (localInputFuture.isCancelled()) {
          @SuppressWarnings("unchecked")
          boolean unused =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

        @RetainedLocalRef F localFallback = fallback;
        if (localInputFuture == null | localExceptionType == null | localFallback == null
            // This check, unlike all the others, is a volatile read
            || isCancelled()) {
          return;
        }
        inputFuture = null;
    
        // For an explanation of the cases here, see the comments on AbstractTransformFuture.run.
        V sourceResult = null;
        Throwable throwable = null;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Futures.java

          @Override
          public boolean cancel(boolean mayInterruptIfRunning) {
            return input.cancel(mayInterruptIfRunning);
          }
    
          @Override
          public boolean isCancelled() {
            return input.isCancelled();
          }
    
          @Override
          public boolean isDone() {
            return input.isDone();
          }
    
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/Futures.java

          @Override
          public boolean cancel(boolean mayInterruptIfRunning) {
            return input.cancel(mayInterruptIfRunning);
          }
    
          @Override
          public boolean isCancelled() {
            return input.isCancelled();
          }
    
          @Override
          public boolean isDone() {
            return input.isDone();
          }
    
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.4K bytes
    - Viewed (0)
Back to top