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

adding stop functionality for graceful shutdown #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

odedva
Copy link

@odedva odedva commented Jun 4, 2023

  • adding an internal variable _should_listen for managing the state of the endless for loop
    • this variable also will stop the messages loop in case there are many messages received in the batch
  • exposing a stop function to stop listening and making the listen function to return

@odedva
Copy link
Author

odedva commented Jun 14, 2023

hey - @jegesh would you be able to take a look on this ?

@jegesh
Copy link
Owner

jegesh commented Aug 8, 2023

Hi! Thanks for the contribution. I'm just not clear on the use case you're addressing in this PR. Please explain

@odedva
Copy link
Author

odedva commented Aug 8, 2023

hey - if this is running in a thread, it would be nice to be able to gracefully shutdown the consumption of messages so the application that manages this thread with listener can ext nicely

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