8000 gh-117531: Unblock getters after non-immediate queue shutdown by EpicWink · Pull Request #117532 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-117531: Unblock getters after non-immediate queue shutdown #117532

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

Merged
merged 10 commits into from
Apr 10, 2024
Prev Previous commit
Move comment to correct position
  • Loading branch information
EpicWink committed Apr 9, 2024
commit dbb2190b7477cef939c21aff2de91850d3dc3a2a
2 changes: 1 addition & 1 deletion Lib/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ def shutdown(self, immediate=False):
self.unfinished_tasks -= 1
# release all blocked threads in `join()`
self.all_tasks_done.notify_all()
self.not_empty.notify_all()
# All getters need to re-check queue-empty to raise ShutDown
self.not_empty.notify_all()
self.not_full.notify_all()

# Override these methods to implement other queue organizations
Expand Down
0