Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 32 for Interrupter (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

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

        Thread interrupter =
            new Thread("Interrupter") {
              @Override
              public void run() {
                task.interruptTask();
              }
            };
        interrupter.start();
        // this will happen once the interrupt has been set which means that
        // 1. the runner has been woken up
        // 2. the interrupter is stuck in the call the Thread.interrupt()
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 7.2K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

        Thread interrupter =
            new Thread("Interrupter") {
              @Override
              public void run() {
                task.interruptTask();
              }
            };
        interrupter.start();
        // this will happen once the interrupt has been set which means that
        // 1. the runner has been woken up
        // 2. the interrupter is stuck in the call the Thread.interrupt()
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 7.2K bytes
    - Click Count (0)
  3. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        Interruptenator(Thread interruptee) {
          this(interruptee, new AtomicBoolean(false));
        }
    
        @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait.
        Interruptenator(Thread interruptee, AtomicBoolean shutdown) {
          super(
              () -> {
                while (!shutdown.get()) {
                  interruptee.interrupt();
                  Thread.yield();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 16:11:48 GMT 2026
    - 8.8K bytes
    - Click Count (0)
  4. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        Interruptenator(Thread interruptee) {
          this(interruptee, new AtomicBoolean(false));
        }
    
        @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait.
        Interruptenator(Thread interruptee, AtomicBoolean shutdown) {
          super(
              () -> {
                while (!shutdown.get()) {
                  interruptee.interrupt();
                  Thread.yield();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 16:11:48 GMT 2026
    - 8.8K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

      private static final class Interruptenator implements Runnable {
        private final Thread interruptee;
        private volatile boolean shouldStop = false;
    
        Interruptenator(Thread interruptee) {
          this.interruptee = interruptee;
        }
    
        @Override
        public void run() {
          while (!shouldStop) {
            interruptee.interrupt();
          }
        }
    
        void stopInterrupting() {
          shouldStop = true;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 15:38:30 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        assertFalse(Thread.interrupted());
        try {
          delayedFuture.get(20000, MILLISECONDS);
          fail("expected to be interrupted");
        } catch (InterruptedException expected) {
        } catch (TimeoutException e) {
          throw new RuntimeException(e);
        }
    
        // we were interrupted, but it's been cleared now
        assertFalse(Thread.interrupted());
    
        assertFalse(sleeper.completed);
    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)
  7. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        assertFalse(Thread.interrupted());
        try {
          delayedFuture.get(20000, MILLISECONDS);
          fail("expected to be interrupted");
        } catch (InterruptedException expected) {
        } catch (TimeoutException e) {
          throw new RuntimeException(e);
        }
    
        // we were interrupted, but it's been cleared now
        assertFalse(Thread.interrupted());
    
        assertFalse(sleeper.completed);
    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)
  8. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        fakePool.execute(() -> Thread.currentThread().interrupt());
        // Run a task that expects that it is not interrupted while it is running.
        e.execute(() -> 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        fakePool.execute(() -> Thread.currentThread().interrupt());
        // Run a task that expects that it is not interrupted while it is running.
        e.execute(() -> 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  10. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

      /**
       * Waits until the given future {@linkplain Future#isDone is done}, invoking the garbage collector
       * as necessary to try to ensure that this will happen.
       *
       * @throws RuntimeException if timed out or interrupted while waiting
       */
      @SuppressWarnings("removal") // b/487687332
      public static void awaitDone(Future<?> future) {
        if (future.isDone()) {
          return;
        }
        long timeoutSeconds = timeoutSeconds();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 20:19:19 GMT 2026
    - 12.3K bytes
    - Click Count (0)
Back to Top