Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listener Priority Considerations #9

Open
ZeroMemes opened this issue May 13, 2023 · 0 comments
Open

Listener Priority Considerations #9

ZeroMemes opened this issue May 13, 2023 · 0 comments
Labels

Comments

@ZeroMemes
Copy link
Owner

Currently, Listener priority for events is only used for sorting Listener instances in ListenerGroup. This works fine if a single event bus is being used without super listeners. However, when an event is posted to an attachable event bus, the attachable bus will dispatch the event to all of it's registered listeners before any of the children receive it, regardless of priority. Similarly, if super listeners are being used, the listeners subscribing to the exact type of an event will receive the event first, regardless of whether a listener of a super type is subscribed with a higher priority.

Ideally, some sort of mechanism for "global" listener priority should exist to solve this issue. The only way I can think of implementing this is through a multi-stage event dispatch, but that would likely require a small number of fixed event priorities, rather than any arbitrary integer value.

@ZeroMemes ZeroMemes added the bug label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant