Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 15 for wasInterrupted (0.08 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. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 6.5K bytes
    - Click Count (0)
Back to Top