- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for addListener (0.06 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
CountingRunnable after = new CountingRunnable(); future.addListener(before, directExecutor()); future.setFuture(delegate); future.addListener(inBetween, directExecutor()); delegate.set(1); future.addListener(after, directExecutor()); before.assertRun(); inBetween.assertRun(); after.assertRun(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 15.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
ListenerCallQueue<Object> queue = new ListenerCallQueue<>(); queue.addListener(listener1, directExecutor()); Multiset<Object> counters = ConcurrentHashMultiset.create(); queue.enqueue(incrementingEvent(counters, listener1, 1)); queue.enqueue(incrementingEvent(counters, listener1, 2)); Object listener2 = new Object(); queue.addListener(listener2, directExecutor());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 8.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
ListenerCallQueue<Object> queue = new ListenerCallQueue<>(); queue.addListener(listener1, directExecutor()); Multiset<Object> counters = ConcurrentHashMultiset.create(); queue.enqueue(incrementingEvent(counters, listener1, 1)); queue.enqueue(incrementingEvent(counters, listener1, 2)); Object listener2 = new Object(); queue.addListener(listener2, directExecutor());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 8.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java
NoOpService service1 = new NoOpService(); // This service will start service1 when addListener is called. This simulates service1 being // started asynchronously. Service service2 = new Service() { final NoOpService delegate = new NoOpService(); @Override public final void addListener(Listener listener, Executor executor) { service1.startAsync();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 20:34:52 UTC 2025 - 25.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java
* * <p><b>Warning:</b> If the input future does not already implement {@code ListenableFuture}, the * returned future will emulate {@link ListenableFuture#addListener} by taking a thread from an * internal, unbounded pool at the first call to {@code addListener} and holding it until the * future is {@linkplain Future#isDone() done}. * * <p>Prefer to create {@code ListenableFuture} instances with {@link SettableFuture}, {@link
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 7.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
// racing addListener calls and addListener calls completing after the future completes. Runnable listener = k % 2 == 0 ? collectResultsRunnable : collectResultsTimedGetRunnable; allTasks.add(listener); allTasks.add( new Runnable() { @Override public void run() { currentFuture.get().addListener(listener, executor); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 46.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
import junit.framework.TestCase; import org.jspecify.annotations.Nullable; /** * Abstract test case parent for anything implementing {@link ListenableFuture}. Tests the two get * methods and the addListener method. * * @author Sven Mawson * @since 10.0 */ @GwtIncompatible public abstract class AbstractListenableFutureTest extends TestCase { protected CountDownLatch latch;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 6.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
// racing addListener calls and addListener calls completing after the future completes. Runnable listener = k % 2 == 0 ? collectResultsRunnable : collectResultsTimedGetRunnable; allTasks.add(listener); allTasks.add( new Runnable() { @Override public void run() { currentFuture.get().addListener(listener, executor); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 46.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
import junit.framework.TestCase; import org.jspecify.annotations.Nullable; /** * Abstract test case parent for anything implementing {@link ListenableFuture}. Tests the two get * methods and the addListener method. * * @author Sven Mawson * @since 10.0 */ @GwtIncompatible public abstract class AbstractListenableFutureTest extends TestCase { protected CountDownLatch latch;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 6.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FluentFuture.java
} @Override public final boolean isCancelled() { return super.isCancelled(); } @Override public final void addListener(Runnable listener, Executor executor) { super.addListener(listener, executor); } @CanIgnoreReturnValue @Override public final boolean cancel(boolean mayInterruptIfRunning) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 19.7K bytes - Viewed (0)