- Sort Score
- Result 10 results
- Languages All
Results 51 - 56 of 56 for addListener (0.14 sec)
-
android/guava/src/com/google/common/util/concurrent/ClosingFuture.java
* }</pre> * * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See * the discussion in the {@link ListenableFuture#addListener} documentation. All its warnings * about heavyweight listeners are also applicable to heavyweight functions passed to this method. * * <p>After calling this method, you may not call {@link #finishToFuture()}, {@link
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 08 19:36:35 UTC 2024 - 98.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java
protected final boolean wasInterrupted() { return sync.wasInterrupted(); } /** * {@inheritDoc} * * @since 10.0 */ @Override public void addListener(Runnable listener, Executor exec) { executionList.add(listener, exec); } /** * Subclasses should invoke this method to set the result of the computation to {@code value}.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 13.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} finally { joinPool(e); } } private static void assertListenerRunImmediately(ListenableFuture<?> future) { CountingRunnable listener = new CountingRunnable(); future.addListener(listener, directExecutor()); assertEquals(1, listener.count); } private static final class CountingRunnable implements Runnable { int count; @Override public void run() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} finally { joinPool(e); } } private static void assertListenerRunImmediately(ListenableFuture<?> future) { CountingRunnable listener = new CountingRunnable(); future.addListener(listener, directExecutor()); assertEquals(1, listener.count); } private static final class CountingRunnable implements Runnable { int count; @Override public void run() {
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/MoreExecutors.java
ListeningExecutorService executorService, 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/src/com/google/common/cache/LocalCache.java
final LoadingValueReference<K, V> loadingValueReference, CacheLoader<? super K, V> loader) { final ListenableFuture<V> loadingFuture = loadingValueReference.loadFuture(key, loader); loadingFuture.addListener( () -> { try { getAndRecordStats(key, hash, loadingValueReference, loadingFuture); } catch (Throwable t) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 149.2K bytes - Viewed (0)