core-java icon indicating copy to clipboard operation
core-java copied to clipboard

Turn `Stand` into a factory of `EventDispatcher`s

Open dmdashenkov opened this issue 5 years ago • 1 comments

There is no good way to know if an event is "dead" or not, as all events always have at least one dispatcher — Stand. We should make Stand register separate event dispatchers for each client subscription so that the number of dispatchers is EventBus reflects the use of events.

dmdashenkov avatar Nov 11 '19 13:11 dmdashenkov

It is, however, dangerous in performance terms to create an instance of EventDispatcher per client subscription, as there may be thousands of the latter. It is worthwhile considering to create a distinct dispatcher per event type.

dmdashenkov avatar Nov 11 '19 14:11 dmdashenkov