Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for requestInterruptIn (0.09 seconds)

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

        TimedLatch latch = new TimedLatch(/* countdownInMillis= */ 50);
        requestInterruptIn(10);
        latch.awaitSuccessfully();
        assertInterrupted();
      }
    
      public void testAwaitTimeoutSingleInterruptNoExpire() {
        TimedLatch latch = new TimedLatch(/* countdownInMillis= */ 50);
        requestInterruptIn(10);
        latch.awaitSuccessfully(LONG_DELAY_MS);
        assertInterrupted();
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        TimedLatch latch = new TimedLatch(/* countdownInMillis= */ 50);
        requestInterruptIn(10);
        latch.awaitSuccessfully();
        assertInterrupted();
      }
    
      public void testAwaitTimeoutSingleInterruptNoExpire() {
        TimedLatch latch = new TimedLatch(/* countdownInMillis= */ 50);
        requestInterruptIn(10);
        latch.awaitSuccessfully(LONG_DELAY_MS);
        assertInterrupted();
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          }
        }
    
        void stopInterrupting() {
          shouldStop = true;
        }
      }
    
      /** Interrupts the current thread after sleeping for the specified delay. */
      static void requestInterruptIn(long time, TimeUnit unit) {
        checkNotNull(unit);
        Thread interruptee = Thread.currentThread();
        new Thread(
                () -> {
                  try {
                    unit.sleep(time);
    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)
  4. guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          }
        }
    
        void stopInterrupting() {
          shouldStop = true;
        }
      }
    
      /** Interrupts the current thread after sleeping for the specified delay. */
      static void requestInterruptIn(long time, TimeUnit unit) {
        checkNotNull(unit);
        Thread interruptee = Thread.currentThread();
        new Thread(
                () -> {
                  try {
                    unit.sleep(time);
    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)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

         * 6. Now the result becomes available.
         * 7. We expect get() to return this result.
         * 8. We expect the test thread's interrupt state to be false.
         */
        InterruptionUtil.requestInterruptIn(200, MILLISECONDS);
    
        assertFalse(Thread.interrupted());
        try {
          delayedFuture.get(20000, MILLISECONDS);
          fail("expected to be interrupted");
        } catch (InterruptedException expected) {
    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)
  6. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

         * 6. Now the result becomes available.
         * 7. We expect get() to return this result.
         * 8. We expect the test thread's interrupt state to be false.
         */
        InterruptionUtil.requestInterruptIn(200, MILLISECONDS);
    
        assertFalse(Thread.interrupted());
        try {
          delayedFuture.get(20000, MILLISECONDS);
          fail("expected to be interrupted");
        } catch (InterruptedException expected) {
    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)
Back to Top