- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 115 for interrupt (0.19 sec)
-
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) -
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/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/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(
Java - Registered: Fri May 03 12:43:13 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
() -> 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/src/com/google/common/cache/CacheLoader.java
* @throws Exception if unable to load the result * @throws InterruptedException if this method is interrupted. {@code InterruptedException} is * treated like any other {@code Exception} in all respects except that, when it is caught, * the thread's interrupt status is set */ public abstract V load(K key) throws Exception; /**
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Dec 19 20:20:14 GMT 2022 - 9.5K bytes - Viewed (0) -
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) -
android/guava-tests/test/com/google/common/collect/QueuesTest.java
Future<?> possiblyIgnoredError = threadPool.submit(new Interrupter(currentThread())); Stopwatch timer = Stopwatch.createStarted(); Queues.drainUninterruptibly(q, newArrayList(), 1, 10, MILLISECONDS); assertThat(timer.elapsed(MILLISECONDS)).isAtLeast(10L); // wait for interrupted status and clear it while (!Thread.interrupted()) { Thread.yield(); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 12K 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(
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/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)