Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for interrupt (0.26 sec)

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

        }
        if (restoreInterruptedBit) {
          currentThread.interrupt();
        }
        /*
         * TODO(cpovirk): Clear interrupt status here? We currently don't, which means that an interrupt
         * before, during, or after runInterruptibly() (unless it produced an InterruptedException
         * caught above) can linger and affect listeners.
         */
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 29 21:34:48 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

          Thread.currentThread().interrupt()
        }
      }
    
      private fun cancelLater(
        call: Call,
        delayMillis: Int,
      ): CountDownLatch {
        val latch = CountDownLatch(1)
        Thread {
          sleep(delayMillis)
          if (cancelMode == CANCEL) {
            call.cancel()
          } else {
            threadToCancel!!.interrupt()
          }
          latch.countDown()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  3. 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 Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

        isInterruptibleRegistered.await();
        // trigger the interrupt on another thread since it will block
        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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

        isInterruptibleRegistered.await();
        // trigger the interrupt on another thread since it will block
        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
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // Thread.interrupt
      public void testGetUnchecked_interrupted() {
        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top