private static final class Dispatcher.PerThreadQueuedDispatcher extends Dispatcher
Dispatcher.perThreadDispatchQueue() dispatcher.| Modifier and Type | Class and Description |
|---|---|
private static class |
Dispatcher.PerThreadQueuedDispatcher.Event |
| Modifier and Type | Field and Description |
|---|---|
private ThreadLocal<Boolean> |
dispatching
Per-thread dispatch state, used to avoid reentrant event dispatching.
|
private ThreadLocal<Queue<Dispatcher.PerThreadQueuedDispatcher.Event>> |
queue
Per-thread queue of events to dispatch.
|
| Modifier | Constructor and Description |
|---|---|
private |
PerThreadQueuedDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
dispatch(Object event,
Iterator<Subscriber> subscribers)
Dispatches the given
event to the given subscribers. |
immediate, legacyAsync, perThreadDispatchQueueprivate final ThreadLocal<Queue<Dispatcher.PerThreadQueuedDispatcher.Event>> queue
private final ThreadLocal<Boolean> dispatching
private PerThreadQueuedDispatcher()
void dispatch(Object event, Iterator<Subscriber> subscribers)
Dispatcherevent to the given subscribers.dispatch in class Dispatcherevent - event to dispatchsubscribers - subscribers to notify