Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 98 for interrupted (0.07 sec)

  1. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      // Test that interrupts result in RuntimeException, not InterruptedException.
      // Trickier than it looks, because runFinalization swallows interrupts.
      // ----------------------------------------------------------------
    
      class Interruptenator extends Thread {
        final AtomicBoolean shutdown;
    
        Interruptenator(final Thread interruptee) {
          this(interruptee, new AtomicBoolean(false));
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

         * 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
         * pool thread, the thread pool will reset it for us. Otherwise, the interrupted bit may have
         * been intended for something else, so don't clear it.
         */
        boolean restoreInterruptedBit = false;
        int spinCount = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run a task on the composed Executor that interrupts its thread (i.e. this thread).
        fakePool.execute(
            new Runnable() {
              @Override
              public void run() {
                Thread.currentThread().interrupt();
              }
            });
        // Run a task that expects that it is not interrupted while it is running.
        e.execute(
            new Runnable() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/InterruptibleTask.java

         * 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
         * pool thread, the thread pool will reset it for us. Otherwise, the interrupted bit may have
         * been intended for something else, so don't clear it.
         */
        boolean restoreInterruptedBit = false;
        int spinCount = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 10.1K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  7. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Queues.java

              E e; // written exactly once, by a successful (uninterrupted) invocation of #poll
              while (true) {
                try {
                  e = q.poll(deadline - System.nanoTime(), NANOSECONDS);
                  break;
                } catch (InterruptedException ex) {
                  interrupted = true; // note interruption and retry
                }
              }
              if (e == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 26 14:11:14 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  9. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      // Test that interrupts result in RuntimeException, not InterruptedException.
      // Trickier than it looks, because runFinalization swallows interrupts.
      // ----------------------------------------------------------------
    
      class Interruptenator extends Thread {
        final AtomicBoolean shutdown;
    
        Interruptenator(final Thread interruptee) {
          this(interruptee, new AtomicBoolean(false));
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run a task on the composed Executor that interrupts its thread (i.e. this thread).
        fakePool.execute(
            new Runnable() {
              @Override
              public void run() {
                Thread.currentThread().interrupt();
              }
            });
        // Run a task that expects that it is not interrupted while it is running.
        e.execute(
            new Runnable() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top