- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for requestInterruptIn (0.28 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
public void testJoinSingleInterrupt() { TimedThread thread = TimedThread.createWithDelay(50); requestInterruptIn(10); thread.joinSuccessfully(); assertInterrupted(); } public void testJoinTimeoutSingleInterruptNoExpire() { TimedThread thread = TimedThread.createWithDelay(50); requestInterruptIn(10); thread.joinSuccessfully(LONG_DELAY_MS); assertInterrupted(); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 30.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
public void testJoinSingleInterrupt() { TimedThread thread = TimedThread.createWithDelay(50); requestInterruptIn(10); thread.joinSuccessfully(); assertInterrupted(); } public void testJoinTimeoutSingleInterruptNoExpire() { TimedThread thread = TimedThread.createWithDelay(50); requestInterruptIn(10); thread.joinSuccessfully(LONG_DELAY_MS); assertInterrupted(); }
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) -
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(final long time, final TimeUnit unit) { checkNotNull(unit); final Thread interruptee = Thread.currentThread(); new Thread( new Runnable() { @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.4K bytes - Viewed (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, TimeUnit.MILLISECONDS); assertFalse(Thread.interrupted()); try { delayedFuture.get(20000, TimeUnit.MILLISECONDS); fail("expected to be interrupted");
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) -
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(final long time, final TimeUnit unit) { checkNotNull(unit); final Thread interruptee = Thread.currentThread(); new Thread( new Runnable() { @Override
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.4K bytes - Viewed (1) -
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, TimeUnit.MILLISECONDS); assertFalse(Thread.interrupted()); try { delayedFuture.get(20000, TimeUnit.MILLISECONDS); fail("expected to be interrupted");
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.1K bytes - Viewed (0)