-
Notifications
You must be signed in to change notification settings - Fork 181
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
Kill subprocess on main thread shutting down #3120
base: main
Are you sure you want to change the base?
Conversation
/build |
/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the death watcher
""" | ||
try: | ||
while True: | ||
if threading._SHUTTING_DOWN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a good practice. I googled about the use of SHUTTING_DOWN, and people seem to suggest against using it.
Maybe we should just make sure that all threads set daemon to True.
Description
flare API starts several thread pools but it doesn't provide a shutdown/cleanup call.
The user's code doesn't terminate if it errors out. A watch thread is added to kill the
process on shutting down.
Types of changes
./runtest.sh
.