- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for requestInterruptIn (0.1 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
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) -
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) -
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) -
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) -
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)