- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 51 for SettableFuture (0.21 sec)
-
android/guava/src/com/google/common/util/concurrent/SettableFuture.java
*/ @GwtCompatible @ElementTypesAreNonnullByDefault public final class SettableFuture<V extends @Nullable Object> extends AbstractFuture.TrustedFuture<V> { /** * Creates a new {@code SettableFuture} that can be completed or cancelled by a later method call. */ public static <V extends @Nullable Object> SettableFuture<V> create() { return new SettableFuture<>(); } @CanIgnoreReturnValue @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Oct 01 17:18:04 GMT 2021 - 2.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
public void testSameThreadSuccess() { SettableFuture<String> f = SettableFuture.create(); MockCallback callback = new MockCallback("foo"); addCallback(f, callback, directExecutor()); f.set("foo"); } public void testExecutorSuccess() { CountingSameThreadExecutor ex = new CountingSameThreadExecutor(); SettableFuture<String> f = SettableFuture.create(); MockCallback callback = new MockCallback("foo");
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Apr 06 12:56:11 GMT 2023 - 6.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
} }; final SettableFuture<String> delayedSuccess = SettableFuture.create(); final SettableFuture<String> delayedFailed = SettableFuture.create(); final SettableFuture<String> delayedCancelled = SettableFuture.create(); final SettableFuture<String> delegateForDelayedRuntimeException = SettableFuture.create(); final ListenableFuture<String> delayedRuntimeException =
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 144.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java
SettableFuture<String> future = SettableFuture.create(); FutureTask<Boolean> interruptReporter = untimedInterruptReporter(future, false); runNInterruptsTest(times, future, interruptReporter); } private static void runTimedInterruptsTest(int times) throws InterruptedException, ExecutionException, TimeoutException { SettableFuture<String> future = SettableFuture.create();
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
private Class<?> settableFutureClass; private Class<?> abstractFutureClass; @Override protected void setUp() throws Exception { // Load the "normal" copy of SettableFuture and related classes. SettableFuture<?> unused = SettableFuture.create(); // Hack to load AbstractFuture et. al. in a new classloader so that it re-reads the cancellation
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java
assertEquals("foo", getChecked(immediateFuture("foo"), TwoArgConstructorException.class)); } public void testGetCheckedUntimed_interrupted() { SettableFuture<String> future = SettableFuture.create(); Thread.currentThread().interrupt(); try { getChecked(future, TwoArgConstructorException.class); fail(); } catch (TwoArgConstructorException expected) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
SettableFuture<String> future = SettableFuture.create(); SettableFuture<String> nested = SettableFuture.create(); assertTrue(future.setFuture(nested)); // Later attempts to set the future should return false. assertFalse(future.set("x")); assertFalse(future.setException(new Exception("bar"))); assertFalse(future.setFuture(SettableFuture.<String>create()));
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.3K bytes - Viewed (1) -
android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
SettableFuture<String> future = SettableFuture.create(); SettableFuture<String> nested = SettableFuture.create(); assertTrue(future.setFuture(nested)); // Later attempts to set the future should return false. assertFalse(future.set("x")); assertFalse(future.setException(new Exception("bar"))); assertFalse(future.setFuture(SettableFuture.<String>create()));
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) -
android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
public void testFromFluentFuture() { FluentFuture<String> f = FluentFuture.from(SettableFuture.<String>create()); assertThat(FluentFuture.from(f)).isSameInstanceAs(f); } public void testFromFluentFuturePassingAsNonFluent() { ListenableFuture<String> f = FluentFuture.from(SettableFuture.<String>create()); assertThat(FluentFuture.from(f)).isSameInstanceAs(f); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
} }; final SettableFuture<String> delayedSuccess = SettableFuture.create(); final SettableFuture<String> delayedFailed = SettableFuture.create(); final SettableFuture<String> delayedCancelled = SettableFuture.create(); final SettableFuture<String> delegateForDelayedRuntimeException = SettableFuture.create(); final ListenableFuture<String> delayedRuntimeException =
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 144.5K bytes - Viewed (0)