- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 80 for isDone (0.12 sec)
-
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, MILLISECONDS)); nested.set("foo"); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals("foo", future.get()); } private static class Foo {}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 7.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
} } /** * Tests that a canceled future throws a cancellation exception. * * <p>This method checks the cancel, isCancelled, and isDone methods. */ public void testCanceledFutureThrowsCancellation() throws Exception { assertFalse(future.isDone()); assertFalse(future.isCancelled()); CountDownLatch successLatch = new CountDownLatch(1);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
} /** * Waits until the given future {@linkplain Future#isDone is done}, invoking the garbage collector * as necessary to try to ensure that this will happen. * * @throws RuntimeException if timed out or interrupted while waiting */ @SuppressWarnings("removal") // b/260137033 public static void awaitDone(Future<?> future) { if (future.isDone()) { return; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
android/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, MILLISECONDS)); nested.set("foo"); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals("foo", future.get()); } private static class Foo {}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 7.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java
out = null; // times out and throws RuntimeException on failure GcFinalization.awaitDone( new GcFinalization.FinalizationPredicate() { @Override public boolean isDone() { return !file.exists(); } }); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Jun 08 21:20:23 UTC 2023 - 1.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
} /** * Waits until the given future {@linkplain Future#isDone is done}, invoking the garbage collector * as necessary to try to ensure that this will happen. * * @throws RuntimeException if timed out or interrupted while waiting */ @SuppressWarnings("removal") // b/260137033 public static void awaitDone(Future<?> future) { if (future.isDone()) { return; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
protected void finalize() { future.set(null); } }; unused = null; // Hint to the JIT that unused is unreachable GcFinalization.awaitDone(future); assertTrue(future.isDone()); assertFalse(future.isCancelled()); } public void testAwaitDone_future_cancel() { final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object unused = new Object() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java
assertThat(runnableFuture).isInstanceOf(TrustedListenableFutureTask.class); assertTrue(runnableFuture.isDone()); assertTrue(runnable.run); ListenableFuture<String> callableFuture = e.submit(new TestCallable()); assertThat(callableFuture).isInstanceOf(TrustedListenableFutureTask.class); assertTrue(callableFuture.isDone()); assertEquals("foo", callableFuture.get()); TestRunnable runnable2 = new TestRunnable();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java
assertThat(runnableFuture).isInstanceOf(TrustedListenableFutureTask.class); assertTrue(runnableFuture.isDone()); assertTrue(runnable.run); ListenableFuture<String> callableFuture = e.submit(new TestCallable()); assertThat(callableFuture).isInstanceOf(TrustedListenableFutureTask.class); assertTrue(callableFuture.isDone()); assertEquals("foo", callableFuture.get()); TestRunnable runnable2 = new TestRunnable();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
if (!future.isDone()) { errorMessage.set("Set call exited before future was complete."); } } }); executor.execute( new Runnable() { @Override public void run() { future.setException(new IllegalArgumentException("failure")); if (!future.isDone()) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 47.1K bytes - Viewed (0)