- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 363 for FUTURE (0.11 sec)
-
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());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); assertThrows(CancellationException.class, () -> future.get()); } public void testFailedFuture(@Nullable String message) throws InterruptedException { assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertTrue(latch.await(5, SECONDS)); assertTrue(future.isDone()); assertFalse(future.isCancelled());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java
* Future} instances to be upgraded to {@code ListenableFuture} after the fact. */ public static <V extends @Nullable Object> ListenableFuture<V> listenInPoolThread( Future<V> future) { if (future instanceof ListenableFuture) { return (ListenableFuture<V>) future; } return new ListenableFutureAdapter<>(future); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 7.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
* completes. Cancelling the supplied future will also cancel the returned future, but cancelling * the returned future will have no effect on the supplied future. * * @since 15.0 */ public static <V extends @Nullable Object> ListenableFuture<V> nonCancellationPropagating( ListenableFuture<V> future) { if (future.isDone()) { return future; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/TestPlatform.java
} /** * Retrieves the result of a {@code Future} known to be done but uses the {@code get(long, * TimeUnit)} overload in order to test that method. */ static <V> V getDoneFromTimeoutOverload(Future<V> future) throws ExecutionException { checkState(future.isDone(), "Future was expected to be done: %s", future); try { return getUninterruptibly(future, 0, SECONDS); } catch (TimeoutException e) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 2.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java
return new ExecutionListWrapper() { final AbstractFuture<?> future = new AbstractFuture<Object>() {}; @Override public void add(Runnable runnable, Executor executor) { future.addListener(runnable, executor); } @Override public void execute() { future.set(null); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 20.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
return i; } }; List<Future<Integer>> futures = executor.invokeAll(Collections.nCopies(10, incrementTask)); for (int i = 0; i < 10; i++) { Future<Integer> future = futures.get(i); assertTrue("Task should have been run before being returned", future.isDone()); assertEquals(i, future.get().intValue()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Uninterruptibles.java
@ParametricNullness public static <V extends @Nullable Object> V getUninterruptibly( Future<V> future, Duration timeout) throws ExecutionException, TimeoutException { return getUninterruptibly(future, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); } /** * Invokes {@code future.}{@link Future#get(long, TimeUnit) get(timeout, unit)} uninterruptibly. * * <p>Similar methods: * * <ul>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 19.1K 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) -
guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
@CanIgnoreReturnValue @ParametricNullness static <V extends @Nullable Object, X extends Exception> V getChecked( Future<V> future, Class<X> exceptionClass) throws X { return getChecked(bestGetCheckedTypeValidator(), future, exceptionClass); } /** Implementation of {@link Futures#getChecked(Future, Class)}. */ @CanIgnoreReturnValue @VisibleForTesting @ParametricNullness
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.9K bytes - Viewed (0)