Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 17 for wasInterrupted (0.14 seconds)

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

        SettableFuture<String> future = SettableFuture.create();
        FutureTask<Boolean> wasInterrupted = untimedInterruptReporter(future, true);
    
        Thread waitingThread = new Thread(wasInterrupted);
        waitingThread.start();
        waitingThread.interrupt();
        ExecutionException expected = assertThrows(ExecutionException.class, wasInterrupted::get);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

            CAUSELESS_INTERRUPTED = new Cancellation(true, null);
          }
        }
    
        final boolean wasInterrupted;
        final @Nullable Throwable cause;
    
        Cancellation(boolean wasInterrupted, @Nullable Throwable cause) {
          this.wasInterrupted = wasInterrupted;
          this.cause = cause;
        }
      }
    
      /** A special value that encodes the 'setFuture' state. */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 14:39:00 GMT 2026
    - 43.6K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        SettableFuture<String> future = SettableFuture.create();
        FutureTask<Boolean> wasInterrupted = untimedInterruptReporter(future, true);
    
        Thread waitingThread = new Thread(wasInterrupted);
        waitingThread.start();
        waitingThread.interrupt();
        ExecutionException expected = assertThrows(ExecutionException.class, wasInterrupted::get);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  4. 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 16K bytes
    - Click Count (0)
  5. 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) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  6. 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) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 13.8K bytes
    - Click Count (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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Jul 11 18:52:30 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        assertTrue(compound.cancel(true));
        assertTrue(future1.isCancelled());
        assertTrue(future1.wasInterrupted());
        assertTrue(future2.isCancelled());
        assertTrue(future2.wasInterrupted());
        assertTrue(otherCompound.isCancelled());
      }
    
      public void testAllAsList_resultCancelled_withSecondaryListFuture() throws Exception {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 134K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        assertTrue(compound.cancel(true));
        assertTrue(future1.isCancelled());
        assertTrue(future1.wasInterrupted());
        assertTrue(future2.isCancelled());
        assertTrue(future2.wasInterrupted());
        assertTrue(otherCompound.isCancelled());
      }
    
      public void testAllAsList_resultCancelled_withSecondaryListFuture() throws Exception {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 134K bytes
    - Click Count (0)
  10. android/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();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 7.4K bytes
    - Click Count (0)
Back to Top