- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 264 for Future (0.14 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java
UncheckedThrowingFuture<V> future = new UncheckedThrowingFuture<V>(); future.complete(checkNotNull(error)); return future; } public static <V> ListenableFuture<V> throwingRuntimeException(RuntimeException e) { UncheckedThrowingFuture<V> future = new UncheckedThrowingFuture<V>(); future.complete(checkNotNull(e)); return future; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 12 20:02:10 GMT 2018 - 3.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
} void assertThatFutureFailsWithException(Future<?> future) { try { getUninterruptibly(future); fail("Expected future to fail: " + future); } catch (ExecutionException e) { assertThat(e).hasCauseThat().isSameInstanceAs(exception); } } static void assertThatFutureBecomesCancelled(Future<?> future) throws ExecutionException { try {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 75.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTest.java
* limitations under the License. */ package com.google.common.util.concurrent; import static com.google.common.truth.Truth.assertWithMessage; import java.util.concurrent.Executor; import java.util.concurrent.Future; import junit.framework.TestCase; /** Test for {@link ListenableFuture}. */ public class ListenableFutureTest extends TestCase { public void testNoNewApis() throws Exception { assertWithMessage(
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Jun 15 19:48:16 GMT 2023 - 1.7K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java
* the License. */ package com.google.common.util.concurrent; import java.util.concurrent.Executor; import java.util.concurrent.Future; import jsinterop.annotations.JsFunction; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsOptional; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Oct 24 18:27:19 GMT 2023 - 3.9K bytes - Viewed (1) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java
static final Future<String> FAILED_FUTURE_OTHER_THROWABLE = immediateFailedFuture(OTHER_THROWABLE); static final Error ERROR = new Error("mymessage"); static final Future<String> FAILED_FUTURE_ERROR = immediateFailedFuture(ERROR); static final Future<String> RUNTIME_EXCEPTION_FUTURE = UncheckedThrowingFuture.throwingRuntimeException(RUNTIME_EXCEPTION);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 13:46:56 GMT 2023 - 6.2K 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()); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 28.2K bytes - Viewed (3) -
android/guava/src/com/google/common/util/concurrent/ListenableFuture.java
* result. (If you want such access, you may prefer {@link Futures#addCallback * Futures.addCallback}.) Still, direct {@code addListener} calls are occasionally useful: * * <pre>{@code * final String name = ...; * inFlight.add(name); * ListenableFuture<Result> future = service.query(name); * future.addListener(new Runnable() { * public void run() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Jun 26 21:13:41 GMT 2023 - 8K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/util/concurrent/FuturesGetCheckedBenchmark.java
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Mar 22 03:01:34 GMT 2022 - 6.6K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java
@Override public ModelSource resolveModel(final Parent parent, AtomicReference<Parent> modified) throws UnresolvableModelException { Result result; try { Future<Result> future = parentCache.computeIfAbsent(parent.getId(), id -> { ForkJoinPool pool = new ForkJoinPool(MAX_CAP); ForkJoinTask<Result> task = new ForkJoinTask<>() { Result result;
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Thu Apr 25 14:13:36 GMT 2024 - 15.8K bytes - Viewed (0) -
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 Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 18:30:30 GMT 2023 - 6K bytes - Viewed (0)