- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 12 for setFuture (0.15 seconds)
-
guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
// cancellation can interleave in 3 ways // 1. prior to setFuture // 2. after setFuture before set() on the future assigned // 3. after setFuture and set() are called but before the listener completes. if (!setFutureSetSuccess.get() || !setFutureCompletionSuccess.get()) { // If setFuture fails or set on the future fails then it must be because that future was // cancelledCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 46.8K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
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.create())); // Check that the future has been set properly. assertFalse(future.isDone());
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 17:49:12 GMT 2025 - 7.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
assertCancelled(future, true); } public void testSetFuturePending() throws Exception { assertThat(future.setFuture(delegate)).isTrue(); assertSetAsynchronously(future); } public void testSetFutureThenCancel() throws Exception { assertThat(future.setFuture(delegate)).isTrue(); assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue(); assertCancelled(future, false);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 15.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
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.create())); // Check that the future has been set properly. assertFalse(future.isDone());
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 17:49:12 GMT 2025 - 7.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
// cancellation can interleave in 3 ways // 1. prior to setFuture // 2. after setFuture before set() on the future assigned // 3. after setFuture and set() are called but before the listener completes. if (!setFutureSetSuccess.get() || !setFutureCompletionSuccess.get()) { // If setFuture fails or set on the future fails then it must be because that future was // cancelledCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 46.8K bytes - Click Count (0) -
guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
() -> { if (taskFuture.isDone()) { // Since the value of oldFuture can only ever be immediateVoidFuture() or setFuture of a // future that eventually came from immediateVoidFuture(), this doesn't leak throwables // or completion values. newFuture.setFuture(oldFuture); } else if (outputFuture.isCancelled() && taskExecutor.trySetCancelled()) {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 01:35:55 GMT 2025 - 22.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
executor.execute(runnable); } }; Future<?> future = newFutureInstance(); future .getClass() .getMethod( "setFuture", future.getClass().getClassLoader().loadClass(ListenableFuture.class.getName())) .invoke(future, badFuture); CancellationException expected = assertThrows(CancellationException.class, () -> future.get());
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 6.2K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
() -> { if (taskFuture.isDone()) { // Since the value of oldFuture can only ever be immediateVoidFuture() or setFuture of a // future that eventually came from immediateVoidFuture(), this doesn't leak throwables // or completion values. newFuture.setFuture(oldFuture); } else if (outputFuture.isCancelled() && taskExecutor.trySetCancelled()) {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 01:35:55 GMT 2025 - 22.1K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
public void run() { // This prevents cancellation from propagating because we don't call setFuture(delegate) until // delegate is already done, so calling cancel() on this future won't affect it. @RetainedLocalRef ListenableFuture<V> localDelegate = delegate; if (localDelegate != null) { setFuture(localDelegate); } } @Override protected @Nullable String pendingToString() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 64.3K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/FluentFuture.java
@GwtCompatible public abstract class FluentFuture<V extends @Nullable Object> extends GwtFluentFutureCatchingSpecialization<V> { /** * A less abstract subclass of AbstractFuture. This can be used to optimize setFuture by ensuring * that {@link #get} calls exactly the implementation of {@link AbstractFuture#get}. */ abstract static class TrustedFuture<V extends @Nullable Object> extends FluentFuture<V>
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 19.7K bytes - Click Count (0)