- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 153 for Dispatch (0.05 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) -
android/guava/src/com/google/common/eventbus/AsyncEventBus.java
/** * An {@link EventBus} that takes the Executor of your choice and uses it to dispatch events, * allowing dispatch to occur asynchronously. * * @author Cliff Biffle * @since 10.0 */ @ElementTypesAreNonnullByDefault public class AsyncEventBus extends EventBus { /** * Creates a new AsyncEventBus that will use {@code executor} to dispatch events. Assigns {@code * identifier} as the bus's name for logging purposes. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Apr 22 13:05:46 UTC 2021 - 2.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ListenerCallQueue.java
* using a lock, however it is dangerous to dispatch listeners while holding a lock because they * might run on the {@code directExecutor()} or be otherwise re-entrant (call back into your * object). So it is important to not call {@link #dispatch} while holding any locks. This is why * {@link #enqueue} and {@link #dispatch} are 2 different methods. It is expected that the decision
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Dec 13 19:45:20 UTC 2023 - 8.2K 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) -
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
protected val responseQueue: BlockingQueue<MockResponse> = LinkedBlockingQueue() private var failFastResponse: MockResponse? = null @Throws(InterruptedException::class) override fun dispatch(request: RecordedRequest): MockResponse { // To permit interactive/browser testing, ignore requests for favicons. val requestLine = request.requestLine if (requestLine == "GET /favicon.ico HTTP/1.1") {
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
} @Test fun simpleDispatch() { 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
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/main/kotlin/okhttp3/mockwebserver/Dispatcher.kt
* limitations under the License. */ package okhttp3.mockwebserver abstract class Dispatcher { @Throws(InterruptedException::class) abstract fun dispatch(request: RecordedRequest): MockResponse open fun peek(): MockResponse { return MockResponse().apply { this.socketPolicy = SocketPolicy.KEEP_OPEN } } open fun shutdown() {}
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Oct 18 12:55:43 UTC 2020 - 909 bytes - Viewed (0)