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

Make Ctrl+C or other signals set self.done #112

Open
WardLT opened this issue Sep 6, 2023 · 0 comments
Open

Make Ctrl+C or other signals set self.done #112

WardLT opened this issue Sep 6, 2023 · 0 comments

Comments

@WardLT
Copy link
Collaborator

WardLT commented Sep 6, 2023

Colmena applications do not exit cleanly on Ctrl+C because you have to kill many threads. You should be able to make the application exit more cleanly by setting the "self.done" flag of the Thinker on the first Ctrl+C, which should signal all of the threads to exit.

We need to:

  1. Put the sections that sit within a try/finally block of the run function
  2. Emit a logging message that indicates the signal was received
  3. Wait as normal for the threads to finish
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

No branches or pull requests

1 participant