-
Notifications
You must be signed in to change notification settings - Fork 77
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
Simple Supervisor shutdown array fix #443
Conversation
Codecov Report
@@ Coverage Diff @@
## master #443 +/- ##
=======================================
Coverage 66.05% 66.05%
=======================================
Files 78 78
Lines 7105 7106 +1
=======================================
+ Hits 4693 4694 +1
Misses 2412 2412
Continue to review full report at Codecov.
|
@@ -211,7 +211,8 @@ def shutdown(self): | |||
if self.sending_thread is not None: | |||
self.sending_thread.join() | |||
logger.debug(f"Joining agents {self.agents}") | |||
for agent_info in self.agents.values(): | |||
agents_to_close = list(self.agents.values()) |
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.
Could you add a comment explaining the reason for separating it like that here. If I am refactoring this code and I get to to this line, I definitely change it back to what it was before this PR.
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.
Please add that comment to avoid future confusions.
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.
Great, thank you!
Right now shutdown isn't being particularly safe iterating over the agents to close. This updates that iteration to pre-populate the list of threads to join.