- Sort Score
- Num 10 results
- Language All
Results 1 - 9 of 9 for FutureTask (0.09 seconds)
-
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
protected Integer initialValue() { return 0; } }; Runnable incrementTask = () -> threadLocalCount.set(threadLocalCount.get() + 1); FutureTask<@Nullable Void> otherTask = new FutureTask<>( () -> { Future<?> future = executor.submit(incrementTask); assertTrue(future.isDone());
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 26.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
protected Integer initialValue() { return 0; } }; Runnable incrementTask = () -> threadLocalCount.set(threadLocalCount.get() + 1); FutureTask<@Nullable Void> otherTask = new FutureTask<>( () -> { Future<?> future = executor.submit(incrementTask); assertTrue(future.isDone());
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 26.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java
(timeout == null) ? "untimed" : timeout, scenario, expectedOutcome); } @Override protected void runTest() throws Throwable { FutureTask<@Nullable Void> task = new FutureTask<>(this::runChosenTest, null); startThread(task::run); awaitUninterruptibly(doingCallLatch); long hangDelayMillis = (expectedOutcome == Outcome.HANG)
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 26.7K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java
assertFalse(waiter.isAlive()); } public void testAwaitTerminated_failedService() throws Exception { ManualSwitchedService service = new ManualSwitchedService(); FutureTask<IllegalStateException> waiter = new FutureTask<>(() -> assertThrows(IllegalStateException.class, service::awaitTerminated)); new Thread(waiter).start(); service.startAsync(); service.notifyStarted();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 28.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java
assertFalse(waiter.isAlive()); } public void testAwaitTerminated_failedService() throws Exception { ManualSwitchedService service = new ManualSwitchedService(); FutureTask<IllegalStateException> waiter = new FutureTask<>(() -> assertThrows(IllegalStateException.class, service::awaitTerminated)); new Thread(waiter).start(); service.startAsync(); service.notifyStarted();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 28.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java
(timeout == null) ? "untimed" : timeout, scenario, expectedOutcome); } @Override protected void runTest() throws Throwable { FutureTask<@Nullable Void> task = new FutureTask<>(this::runChosenTest, null); startThread(task::run); awaitUninterruptibly(doingCallLatch); long hangDelayMillis = (expectedOutcome == Outcome.HANG)
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 26.7K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java
* Any of the setException() calls below can fail if the output Future is cancelled between now * and then. This means that we're silently swallowing an exception -- maybe even an Error. But * this is no worse than what FutureTask does in that situation. Additionally, because the * Future was cancelled, its listeners have been run, so its consumers will not hang. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 20 18:03:37 GMT 2025 - 10.8K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java
// system scheduling and as such we could either miss our deadline, or unpark() could be delayed // so that it looks like we timed out even though we didn't. For comparison FutureTask respects // completion preferably and AQS is non-deterministic (depends on where in the queue the waiter // is). If we wanted to be strict about it, we could store the unpark() time in the Waiter node
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 33.2K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
* Future might not even be a ListenableFuture, just a plain Future. That said, similar * problems can exist with methods like FutureTask.done(), not to mention slow calls to * Thread.interrupt() (as discussed in InterruptibleTask). At the end of the day, it's * unlikely that cancel() will be slow, so we can probably get away with calling it whileCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Aug 09 01:14:59 GMT 2025 - 27.7K bytes - Click Count (0)