- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 56 for addListener (0.08 sec)
-
android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java
Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) { CatchingFuture<V, X> future = new CatchingFuture<>(input, exceptionType, fallback); input.addListener(future, rejectionPropagatingExecutor(executor, future)); return future; } static <X extends Throwable, V extends @Nullable Object> ListenableFuture<V> createAsync( ListenableFuture<? extends V> input,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 9.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionList.java
* * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See * the discussion in the {@link ListenableFuture#addListener ListenableFuture.addListener} * documentation. */ public void add(Runnable runnable, Executor executor) { // Fail fast on a null. We throw NPE here because the contract of Executor states that it throws
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 22 21:17:24 UTC 2024 - 6.9K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java
AsyncFunction<? super I, ? extends O> function, Executor executor) { checkNotNull(executor); AsyncTransformFuture<I, O> output = new AsyncTransformFuture<>(input, function); input.addListener(output, rejectionPropagatingExecutor(executor, output)); return output; } static <I extends @Nullable Object, O extends @Nullable Object> ListenableFuture<O> create(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 11K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
this.exec = Executors.newCachedThreadPool(); this.future = checkNotNull(future); this.latch = new CountDownLatch(1); } public void setUp() { future.addListener( new Runnable() { @Override public void run() { latch.countDown(); } }, exec); assertEquals(1, latch.getCount());
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/AggregateFuture.java
// Register a listener on each Future in the list to update the state of this future. // Note that if all the futures on the list are done prior to completing this loop, the last // call to addListener() will callback to setOneValue(), transitively call our cleanup // listener, and set this.futures to null. // This is not actually a problem, since the foreach only needs this.futures to be non-null
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 16.2K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Service.java
* service changes state. The listener will not have previous state changes replayed, so it is * suggested that listeners are added before the service starts. * * <p>{@code addListener} guarantees execution ordering across calls to a given listener but not * across calls to multiple listeners. Specifically, a given listener will have its callbacks
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 10.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
// operation in the constructor. // // 1. In the listener that performs the callback. In this case it is fine since inputFuture is // assigned prior to calling addListener, and addListener happens-before any invocation of the // listener. Notably, this means that 'volatile' is unnecessary to make 'inputFuture' visible // to the listener. //
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/src/com/google/common/util/concurrent/ExecutionSequencer.java
// taskFuture guarantees completion if the callable is invoked, and adding to outputFuture // propagates cancellation if the callable has not yet been invoked. outputFuture.addListener(listener, directExecutor()); taskFuture.addListener(listener, directExecutor()); return outputFuture; } enum RunningState { NOT_RUN, CANCELLED, STARTED, } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 01 21:46:34 UTC 2024 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java
} return 25; } }); @Override protected void setUp() throws Exception { super.setUp(); exec = Executors.newCachedThreadPool(); task.addListener( new Runnable() { @Override public void run() { listenerLatch.countDown(); } }, directExecutor()); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 4.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 6.1K bytes - Viewed (0)