Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 170 for interrupt (0.19 sec)

  1. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

                  return;
                }
              }
              // Remove the interrupt bit before each task. The interrupt is for the "current task" when
              // 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();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

            () -> getUninterruptibly(delayedFuture, 500, TimeUnit.MILLISECONDS));
        assertTrue(Thread.interrupted()); // clears the interrupt state, too
    
        assertFalse(sleeper.completed);
        assertTrue(getUninterruptibly(delayedFuture));
    
        assertTrue(Thread.interrupted()); // clears the interrupt state, too
        assertTrue(sleeper.completed);
      }
    
      private static class SleepingRunnable implements Runnable {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/CacheLoader.java

       * @throws Exception if unable to load the result
       * @throws InterruptedException if this method is interrupted. {@code InterruptedException} is
       *     treated like any other {@code Exception} in all respects except that, when it is caught,
       *     the thread's interrupt status is set
       */
      public abstract V load(K key) throws Exception;
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

              suite,
              method,
              Scenario.UNSATISFIED_AND_INTERRUPTED_BEFORE_WAITING,
              TimeoutsToUse.PAST,
              // prefer responding to interrupt over timing out
              isInterruptible(method) ? Outcome.INTERRUPT : Outcome.FAILURE);
          addTests(
              suite,
              method,
              Scenario.UNSATISFIED_AND_INTERRUPTED_BEFORE_WAITING,
              TimeoutsToUse.SMALL,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Monitor.java

              } catch (InterruptedException interrupt) {
                interrupted = true;
                signalBeforeWaiting = false;
              }
            }
          } finally {
            if (!satisfied) {
              lock.unlock(); // No need to signal if timed out
            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  6. 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));
        }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  7. 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));
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/QueuesTest.java

        Future<?> possiblyIgnoredError = threadPool.submit(new Interrupter(currentThread()));
    
        Stopwatch timer = Stopwatch.createStarted();
        Queues.drainUninterruptibly(q, newArrayList(), 1, 10, MILLISECONDS);
        assertThat(timer.elapsed(MILLISECONDS)).isAtLeast(10L);
        // wait for interrupted status and clear it
        while (!Thread.interrupted()) {
          Thread.yield();
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      }
    
      /**
       * Await an interrupt, then clear the interrupt status. Similar to {@code
       * assertTrue(Thread.interrupted())} except that this version tolerates late interrupts.
       */
      private static void assertInterrupted() {
        try {
          /*
           * The sleep() will end immediately if we've already been interrupted or
           * wait patiently for the interrupt if not.
           */
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      }
    
      /**
       * Await an interrupt, then clear the interrupt status. Similar to {@code
       * assertTrue(Thread.interrupted())} except that this version tolerates late interrupts.
       */
      private static void assertInterrupted() {
        try {
          /*
           * The sleep() will end immediately if we've already been interrupted or
           * wait patiently for the interrupt if not.
           */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
Back to top