- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 56 for interrupt (0.05 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
break; } interruptee.interrupt(); } } 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(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
break; } interruptee.interrupt(); } } 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(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 6.6K 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)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
Thread.sleep(delayMillis.toLong()) } catch (e: InterruptedException) { Thread.currentThread().interrupt() } } private fun interruptLater(delayMillis: Int) { val toInterrupt = Thread.currentThread() val interruptingCow = Thread { sleep(delayMillis) toInterrupt.interrupt() } interruptingCow.start() } companion object {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K 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)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/AccessTimeoutTarget.java
public void expired() { int count = 0; while (running.get() && count < MAX_LOOP_COUNT) { if (logger.isDebugEnabled()) { logger.debug("Interrupt {}", runningThread); } runningThread.interrupt(); ThreadUtil.sleepQuietly(1000L); count++; } } public void stop() { running.set(false); }
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 1.8K 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() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 4.4K bytes - Viewed (0) -
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() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 4.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/ProcessHelper.java
if (jobProcess != null) { final InputStreamThread ist = jobProcess.getInputStreamThread(); try { ist.interrupt(); } catch (final Exception e) { logger.warn("Could not interrupt a thread of an input stream.", e); } final CountDownLatch latch = new CountDownLatch(3); final Process process = jobProcess.getProcess();
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:20:39 UTC 2024 - 6.4K bytes - Viewed (0)