- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 206 for dispatch (0.09 sec)
-
guava/src/com/google/common/eventbus/Dispatcher.java
abstract void dispatch(Object event, Iterator<Subscriber> subscribers); /** Implementation of a {@link #perThreadDispatchQueue()} dispatcher. */ private static final class PerThreadQueuedDispatcher extends Dispatcher { // This dispatcher matches the original dispatch behavior of EventBus. /** Per-thread queue of events to dispatch. */ private final ThreadLocal<Queue<Event>> queue =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 7.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/eventbus/DispatcherTest.java
Queues.newConcurrentLinkedQueue(); private Dispatcher dispatcher; public void testPerThreadQueuedDispatcher() { dispatcher = Dispatcher.perThreadDispatchQueue(); dispatcher.dispatch(1, integerSubscribers.iterator()); assertThat(dispatchedSubscribers) .containsExactly( i1, i2, i3, // Integer subscribers are dispatched to first. s1,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/eventbus/DispatcherTest.java
Queues.newConcurrentLinkedQueue(); private Dispatcher dispatcher; public void testPerThreadQueuedDispatcher() { dispatcher = Dispatcher.perThreadDispatchQueue(); dispatcher.dispatch(1, integerSubscribers.iterator()); assertThat(dispatchedSubscribers) .containsExactly( i1, i2, i3, // Integer subscribers are dispatched to first. s1,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ListenerCallQueue.java
* #enqueue enqueueing} and then {@linkplain #dispatch dispatching} events. * * <p>The API of this class is designed to make it easy to achieve the following properties * * <ul> * <li>Multiple events for the same listener are never dispatched concurrently. * <li>Events for the different listeners are dispatched concurrently. * <li>All events for a given listener dispatch on the provided {@link #executor}.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Dec 13 19:45:20 UTC 2023 - 8.2K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt
import okhttp3.ExperimentalOkHttpApi /** Handler for mock server requests. */ @ExperimentalOkHttpApi abstract class Dispatcher { /** * Returns a response to satisfy `request`. This method may block (for instance, to wait on * a CountdownLatch). */ @Throws(InterruptedException::class) abstract fun dispatch(request: RecordedRequest): MockResponse /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 1.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
queue.enqueue(incrementingEvent(counters, listener, 3)); queue.enqueue(incrementingEvent(counters, listener, 4)); assertEquals(0, counters.size()); queue.dispatch(); assertEquals(multiset(listener, 4), counters); } public void testEnqueueAndDispatch_multipleListeners() { Object listener1 = new Object(); ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 8.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
queue.enqueue(incrementingEvent(counters, listener, 3)); queue.enqueue(incrementingEvent(counters, listener, 4)); assertEquals(0, counters.size()); queue.dispatch(); assertEquals(multiset(listener, 4), counters); } public void testEnqueueAndDispatch_multipleListeners() { Object listener1 = new Object(); ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 8.2K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt
import java.util.concurrent.LinkedBlockingQueue import java.util.logging.Logger import okhttp3.ExperimentalOkHttpApi /** * Default dispatcher that processes a script of responses. Populate the script by calling [enqueueResponse]. */ @ExperimentalOkHttpApi open class QueueDispatcher : Dispatcher() { protected val responseQueue: BlockingQueue<MockResponse> = LinkedBlockingQueue() private var failFastResponse: MockResponse? = null
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt
val requestsMade = mutableListOf<RecordedRequest>() val dispatcher: Dispatcher = object : Dispatcher() { override fun dispatch(request: RecordedRequest): MockResponse { requestsMade.add(request) return MockResponse() } } assertThat(requestsMade.size).isEqualTo(0) mockWebServer.dispatcher = dispatcher val url = mockWebServer.url("/").toUrl()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
mockWebServer.start(0) mockWebServer.start(InetAddress.getLocalHost(), 0) mockWebServer.shutdown() var dispatcher: Dispatcher = mockWebServer.dispatcher dispatcher = mockWebServer.dispatcher mockWebServer.dispatcher = QueueDispatcher() mockWebServer.dispatcher = QueueDispatcher() mockWebServer.close() } @Test @Ignore fun pushPromise() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0)