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

AsyncEventQueue: add resetRegistration() to continue using the same r… #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dbrignoli
Copy link
Contributor

…egistration key after AsyncEventQueueFullError

With EventBus being deprecated I am checking how to move exiting code to AsyncEventQueue and was wondering if the addition of resetRegistration() (tentative proc name) would be acceptable. It could be used when tasks catch AsyncEventQueueFullError and handle/log the occurence but then continue receiving events using the same key instead of getting a new one.

…egistration key after AsyncEventQueueFullError
@dbrignoli
Copy link
Contributor Author

Mentioning @cheatfate as he authored AsyncEventQueue 😃

@cheatfate
Copy link
Collaborator

why do you need to reset? I'm not sure i understand why you need to perform unregister/register sequence, if you can just continue working/handling events. Because your procedure does not do anything helpful actually - pending events still going to be scheduled, so what the reason?

@dbrignoli
Copy link
Contributor Author

@cheatfate, my understanding is that once reader.overflow is set to true it will keep raising AsyncEventQueueFullError so there is no way to "reset" a reader after an overflow. The only place where reader.overflow is set to false is upon registration.

The reset would allow to keep using the same reader (using the same key) by resetting it after handling AsyncEventQueueFullError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants