- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 141 for interrupted (0.3 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
/** Runnable which will interrupt the target thread repeatedly when run. */ private static final class Interruptenator implements Runnable { private final long everyMillis; private final Thread interruptee; private volatile boolean shouldStop = false; Interruptenator(Thread interruptee, long everyMillis) { this.everyMillis = everyMillis; this.interruptee = interruptee; } @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) -
android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java
/* * If someone called cancel(true), it is possible that the interrupted bit hasn't been set yet. * Wait for the interrupting thread to set DONE. (See interruptTask().) We want to wait so that * the interrupting thread doesn't interrupt the _next_ thing to run on this thread. * * Note: We don't reset the interrupted bit, just wait for it to be set. If this is a thread
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) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
public static void awaitUninterruptibly(CountDownLatch latch) { boolean interrupted = false; try { while (true) { try { latch.await(); return; } catch (InterruptedException e) { interrupted = true; } } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 14.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
/** Runnable which will interrupt the target thread repeatedly when run. */ private static final class Interruptenator implements Runnable { private final long everyMillis; private final Thread interruptee; private volatile boolean shouldStop = false; Interruptenator(Thread interruptee, long everyMillis) { this.everyMillis = everyMillis; this.interruptee = interruptee; } @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
() -> 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 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.1K bytes - Viewed (0) -
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) -
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 Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
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) -
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 Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Apr 17 14:48:57 GMT 2023 - 27.4K bytes - Viewed (0) -
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 Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 4.3K bytes - Viewed (0)