Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for wasInterrupted (0.29 sec)

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

        SettableFuture<Object> inner = SettableFuture.create();
        async.setFuture(inner);
        async.cancel(true);
        assertTrue(inner.isCancelled());
        assertTrue(inner.wasInterrupted());
        assertThrows(CancellationException.class, () -> inner.get());
      }
    
      public void testCancel_resultCancelsInner() throws Exception {
        SettableFuture<Object> async = SettableFuture.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)
  2. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

        assertFalse(task.isDone());
        task.cancel(false);
        assertTrue(task.isDone());
        assertTrue(task.isCancelled());
        assertFalse(task.wasInterrupted());
        assertThrows(CancellationException.class, () -> getDone(task));
        verifyThreadWasNotInterrupted();
      }
    
      public void testFailed() throws Exception {
        Exception e = new Exception();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

        /**
         * Returns true if this future was cancelled with {@code mayInterruptIfRunning} set to {@code
         * true}.
         *
         * @since 14.0
         */
        protected final boolean wasInterrupted() {
          return sync.wasInterrupted();
        }
    
        /**
         * {@inheritDoc}
         *
         * @since 10.0
         */
        @Override
        public void addListener(Runnable listener, Executor exec) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jan 30 16:59:10 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        InterruptibleFuture future = new InterruptibleFuture();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertFalse(future.wasInterrupted());
        assertFalse(future.interruptTaskWasCalled);
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertThat(e).hasCauseThat().isNull();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

        releaseResources(OUTPUT_FUTURE_DONE); // nulls out `futures`
    
        if (isCancelled() & localFutures != null) {
          boolean wasInterrupted = wasInterrupted();
          for (Future<?> future : localFutures) {
            future.cancel(wasInterrupted);
          }
        }
        /*
         * We don't call clearSeenExceptions() until processCompleted(). Prior to that, it may be needed
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 16K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        InterruptibleFuture future = new InterruptibleFuture();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertFalse(future.wasInterrupted());
        assertFalse(future.interruptTaskWasCalled);
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertThat(e).hasCauseThat().isNull();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/TrustedListenableFutureTask.java

         * won't have been called yet.
         */
        this.task = null;
      }
    
      @Override
      protected void afterDone() {
        super.afterDone();
    
        if (wasInterrupted()) {
          InterruptibleTask<?> localTask = task;
          if (localTask != null) {
            localTask.interruptTask();
          }
        }
    
        this.task = null;
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

          throws InterruptedException, TimeoutException, ExecutionException {
        assertDone(future);
        assertThat(future.isCancelled()).isTrue();
        assertThat(future.wasInterrupted()).isEqualTo(expectWasInterrupted);
    
        try {
          getDone(future);
          fail();
        } catch (CancellationException expected) {
        }
    
        try {
          getDoneFromTimeoutOverload(future);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 15.4K bytes
    - Viewed (0)
Back to top