- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for isCanceled (0.47 sec)
-
guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java
} public void testFutureCancelBeforeInputCompletion() throws Exception { assertTrue(resultFuture.cancel(true)); assertTrue(resultFuture.isCancelled()); assertTrue(inputFuture.isCancelled()); assertFalse(outputFuture.isCancelled()); assertThrows(CancellationException.class, () -> resultFuture.get()); } public void testFutureCancellableBeforeOutputCompletion() throws Exception {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java
assertFalse(task.isCancelled()); // Start the task to put it in the RUNNING state. Have to use a separate // thread because the task will block on the task latch after unblocking // the run latch. exec.execute(task); runLatch.await(); assertEquals(1, listenerLatch.getCount()); assertFalse(task.isDone()); assertFalse(task.isCancelled());
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 4.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java
assertTrue(task.isDone()); assertFalse(task.isCancelled()); assertEquals(2, getDone(task).intValue()); } public void testCancelled() throws Exception { TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create(returning(2)); assertFalse(task.isDone()); task.cancel(false); assertTrue(task.isDone()); assertTrue(task.isCancelled()); assertFalse(task.wasInterrupted()); try {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 7.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
} public void testCancel_notDoneNoInterrupt() throws Exception { Future<?> future = newFutureInstance(); assertTrue(future.cancel(false)); assertTrue(future.isCancelled()); assertTrue(future.isDone()); assertNull(tryInternalFastPathGetFailure(future)); CancellationException e = assertThrows(CancellationException.class, () -> future.get()); assertNotNull(e.getCause()); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ForwardingFluentFuture.java
} @Override public boolean cancel(boolean mayInterruptIfRunning) { return delegate.cancel(mayInterruptIfRunning); } @Override public boolean isCancelled() { return delegate.isCancelled(); } @Override public boolean isDone() { return delegate.isDone(); } @Override @ParametricNullness public V get() throws InterruptedException, ExecutionException {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 05 22:27:35 GMT 2021 - 2.5K bytes - Viewed (0) -
futures/failureaccess/src/com/google/common/util/concurrent/internal/InternalFutures.java
* does not include "was cancelled." To be explicit: If this method returns a non-null value, * then: * * <ul> * <li>{@code isDone()} must return {@code true} * <li>{@code isCancelled()} must return {@code false} * <li>{@code get()} must not block, and it must throw an {@code ExecutionException} with the * return value of this method as its cause * </ul> */ public static
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 1.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java
} @Override @ParametricNullness public V get(long timeout, TimeUnit unit) throws ExecutionException { checkNotNull(unit); return get(); } @Override public boolean isCancelled() { return false; } @Override public boolean isDone() { return true; } @Override public String toString() { // Behaviour analogous to AbstractFuture#toString().
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Dec 13 19:45:20 GMT 2023 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java
} @Override public V get(long timeout, TimeUnit unit) { throw new AssertionFailedError(); } @Override public boolean isCancelled() { throw new AssertionFailedError(); } @Override public boolean isDone() { /* * If isDone is true during the call to listenInPoolThread,
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 9.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java
} public void testFutureCancelBeforeInputCompletion() throws Exception { assertTrue(resultFuture.cancel(true)); assertTrue(resultFuture.isCancelled()); assertTrue(inputFuture.isCancelled()); assertFalse(outputFuture.isCancelled()); assertThrows(CancellationException.class, () -> resultFuture.get()); } public void testFutureCancellableBeforeOutputCompletion() throws Exception {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
// Check that the future has been set properly. assertFalse(future.isDone()); assertFalse(future.isCancelled()); assertThrows(TimeoutException.class, () -> future.get(0, TimeUnit.MILLISECONDS)); nested.set("foo"); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals("foo", future.get()); } private static class Foo {}
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.3K bytes - Viewed (1)