- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 201 for Future (0.32 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
SettableFuture<Integer> future = SettableFuture.create(); assertTrue(future.set(42)); // Later attempts to set the future should return false. assertFalse(future.set(23)); assertFalse(future.setException(new Exception("bar"))); assertFalse(future.setFuture(SettableFuture.<Integer>create())); // Check that the future has been set properly. assertTrue(future.isDone()); assertFalse(future.isCancelled());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java
} final SettableFuture<V> delegate = SettableFuture.create(); @Override protected Future<V> delegate() { return delegate; } void set(V value) { delegate.set(value); } } private static final class RuntimeExceptionThrowingFuture<V> implements Future<V> { final CountDownLatch allowGetToComplete = new CountDownLatch(1); @Override
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) -
guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
@GwtIncompatible public class MockFutureListener implements Runnable { private final CountDownLatch countDownLatch; private final ListenableFuture<?> future; public MockFutureListener(ListenableFuture<?> future) { this.countDownLatch = new CountDownLatch(1); this.future = future; future.addListener(this, directExecutor()); } @Override public void run() { countDownLatch.countDown(); } /**
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri May 12 18:12:42 GMT 2023 - 3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
assertFalse(future.isCancelled()); ExecutorService executor = Executors.newSingleThreadExecutor(); try { Future<Boolean> getResult = executor.submit(() -> future.get()); // Release the future value. latch.countDown(); assertTrue(getResult.get(10, SECONDS)); } finally { executor.shutdownNow(); } assertTrue(future.isDone());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 18:30:30 GMT 2023 - 6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/CombinedFuture.java
super.releaseResources(reason); /* * If the output future is done, then it won't need to interrupt the task later, so it can clear * its reference to it. * * If the output future is *not* done, then the task field will be cleared after the task runs * or after the output future is done, whichever comes first. */ if (reason == OUTPUT_FUTURE_DONE) { this.task = null; } } @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 01 21:46:34 GMT 2024 - 6.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertTrue(latch.await(5, TimeUnit.SECONDS)); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals(expectedValue, future.get()); } public void testCancelledFuture() throws InterruptedException, ExecutionException { assertTrue(future.isDone()); assertTrue(future.isCancelled());
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertTrue(latch.await(5, TimeUnit.SECONDS)); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals(expectedValue, future.get()); } public void testCancelledFuture() throws InterruptedException, ExecutionException { assertTrue(future.isDone()); assertTrue(future.isCancelled());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.3K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java
projectBuildFutureTask.run(); } return projectBuildFutureTask; } public Future<ProjectSegment> take() throws InterruptedException { return null; } public Future<ProjectSegment> poll() { return null; } public Future<ProjectSegment> poll(long timeout, TimeUnit unit) throws InterruptedException { return null; }
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Wed Sep 06 08:39:32 GMT 2023 - 2.6K bytes - Viewed (0) -
android/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 May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.1K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java
return taskDone; } }; List<Future<Boolean>> futureList = executor.invokeAll(ImmutableList.of(task), 10, TimeUnit.MILLISECONDS); Future<Boolean> future = futureList.get(0); assertFalse(taskDone); assertTrue(future.isDone()); assertThrows(CancellationException.class, () -> future.get()); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.7K bytes - Viewed (0)