Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for isInterrupted (0.05 sec)

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

        assertFalse(Thread.currentThread().isInterrupted());
        assertFalse(monitor.isOccupiedByCurrentThread());
    
        doEnterScenarioSetUp();
    
        boolean interruptedBeforeCall = Thread.currentThread().isInterrupted();
        Outcome actualOutcome = doCall();
        boolean occupiedAfterCall = monitor.isOccupiedByCurrentThread();
        boolean interruptedAfterCall = Thread.currentThread().isInterrupted();
    
        if (occupiedAfterCall) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 27K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

          fail();
        } catch (TwoArgConstructorException expected) {
          assertThat(expected).hasCauseThat().isInstanceOf(InterruptedException.class);
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetCheckedUntimed_cancelled() throws TwoArgConstructorException {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run a task that expects that it is not interrupted while it is running.
        e.execute(
            new Runnable() {
              @Override
              public void run() {
                assertThat(Thread.currentThread().isInterrupted()).isFalse();
              }
            });
    
        // Run these together.
        fakePool.runAll();
    
        // Check that this thread has been marked as interrupted again now that the thread has been
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        AtomicBoolean terminated = new AtomicBoolean();
        // we need to keep this in a flag because t.isInterrupted() returns false after t.join()
        AtomicBoolean interrupted = new AtomicBoolean();
        // we need to use another thread because it will be interrupted and thus using
        // the current one, owned by JUnit, would make the test fail
        Thread thread =
            new Thread(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        if (Thread.currentThread().isInterrupted()) {
          throw new AssertionError(
              "Thread interrupted on test entry. "
                  + "Some test probably didn't clear the interrupt state");
        }
    
        tearDownStack.addTearDown(
            new TearDown() {
              @Override
              public void tearDown() {
                Thread.interrupted();
              }
            });
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      public static void awaitUninterruptibly(CountDownLatch latch) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              latch.await();
              return;
            } catch (InterruptedException e) {
              interrupted = true;
            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/Monitor.java

          return true;
        }
        boolean interrupted = Thread.interrupted();
        try {
          long startTime = System.nanoTime();
          for (long remainingNanos = timeoutNanos; ; ) {
            try {
              return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS);
            } catch (InterruptedException interrupt) {
              interrupted = true;
              remainingNanos = remainingNanos(startTime, timeoutNanos);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 42.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

          }
    
          /** Checks if the state is {@link #CANCELLED} or {@link #INTERRUPTED}. */
          boolean isCancelled() {
            return (getState() & (CANCELLED | INTERRUPTED)) != 0;
          }
    
          /** Checks if the state is {@link #INTERRUPTED}. */
          boolean wasInterrupted() {
            return getState() == INTERRUPTED;
          }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jan 30 16:59:10 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

        /*
         * If someone called cancel(true), it is possible that the interrupted bit hasn't been set yet.
         * Wait for the interrupting thread to set DONE. (See interruptTask().) We want to wait so that
         * the interrupting thread doesn't interrupt the _next_ thing to run on this thread.
         *
         * Note: We don't reset the interrupted bit, just wait for it to be set. If this is a thread
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 10K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

              // it is sent, so subsequent tasks in the queue should not be caused to be interrupted
              // by a previous one in the queue being interrupted.
              interruptedDuringTask |= Thread.interrupted();
              try {
                task.run();
              } catch (Exception e) { // sneaky checked exception
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 10.6K bytes
    - Viewed (0)
Back to top