-
-
Notifications
You must be signed in to change notification settings - Fork 99
Fix thread leak by switching to different Queue shutdown mechanism #794
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #794 +/- ##
==========================================
+ Coverage 79.60% 79.73% +0.12%
==========================================
Files 29 30 +1
Lines 4261 4268 +7
Branches 542 543 +1
==========================================
+ Hits 3392 3403 +11
+ Misses 726 722 -4
Partials 143 143 |
2bd953b to
97a240c
Compare
97a240c to
f44401a
Compare
webknjaz
left a comment
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.
@itamarst thanks for looking into this! Too bad there's no backport for shutdown queues.
I have a few cosmetic requests but overall looks good. Could you tweak those? Thanks again!
nijel
left a comment
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.
The tests in translate-toolkit pass with this applied, so for us this fixes #769.
f44401a to
1f8262d
Compare
|
OK, done. |
webknjaz
left a comment
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.
Thanks!
Implementing correct shutdown() would involve copying too much code, so switch to the more traditional way of indicating shutdown to a thread reading from a Queue. Signed-off-by: Itamar Turner-Trauring <[email protected]>
1f8262d to
8d1e5a0
Compare
|
And I fixed the spelling issue too. |
|
🎉 v11.1.2 just hit PyPI: https://pypi.org/project/cheroot/11.1.2/ |
Implementing correct
shutdown()would involve copying too much code, so switch to the more traditional way of indicating shutdown to a thread reading from aQueue.❓ What kind of change does this PR introduce?
📋 What is the related issue number (starting with
#)Resolves #769
Superseded and closes #778
❓ What is the current behavior? (You can also link to an open issue here)
The overload thread leaks in Python < 3.13.
❓ What is the new behavior (if this is a feature change)?
The thread no longer leaks.
📋 Other information:
📋 Contribution checklist:
(If you're a first-timer, check out
this guide on making great pull requests)
the changes have been approved
and description in grammatically correct, complete sentences