- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 401 for Futures (0.12 sec)
-
guava-tests/test/com/google/common/cache/CacheLoaderTest.java
import static com.google.common.util.concurrent.Futures.immediateFuture; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Queues; import com.google.common.util.concurrent.ListenableFuture; import java.util.Deque; import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicInteger;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 3.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java
import com.google.common.util.concurrent.testing.MockFutureListener; import java.util.concurrent.TimeoutException; import junit.framework.TestCase; /** * Unit tests for any listenable future that chains other listenable futures. Unit tests need only * override buildChainingFuture and getSuccessfulResult, but they can add custom tests as needed. * * @author Nishant Thakkar */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.4K bytes - Viewed (0) -
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; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 12 20:02:10 UTC 2018 - 3.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
assertThat(future.isDone()).isFalse(); assertThat(future.set(1)).isTrue(); assertSuccessful(future, 1); } public void testSetFutureNull() throws Exception { assertThrows(NullPointerException.class, () -> future.setFuture(null)); assertThat(future.isDone()).isFalse(); assertThat(future.set(1)).isTrue();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 15.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/MoreExecutors.java
Callable<T> task, final BlockingQueue<Future<T>> queue) { final ListenableFuture<T> future = executorService.submit(task); future.addListener( new Runnable() { @Override public void run() { queue.add(future); } }, directExecutor()); return future; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 44.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToFutureTest.java
* limitations under the License. */ package com.google.common.util.concurrent; import static com.google.common.truth.Truth.assertThat; import static com.google.common.util.concurrent.Futures.immediateFuture; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly; import static org.junit.Assert.assertThrows;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java
* the License. */ package com.google.common.cache; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.util.concurrent.Futures.immediateFuture; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.collect.Maps; import com.google.common.util.concurrent.ListenableFuture;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 4.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jan 22 17:29:38 UTC 2024 - 32.7K 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/UncheckedExecutionException.java
* * (Perhaps it should also have required that its cause was a RuntimeException. However, that * would have required that we throw a different kind of exception for wrapping *checked* * exceptions in methods like Futures.getUnchecked and LoadingCache.get.) */ /** * Creates a new instance with {@code null} as its detail message and no cause. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Mar 07 17:52:19 UTC 2024 - 4.1K bytes - Viewed (0)