-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Clear worker thread cache after forking #3200
base: main
Are you sure you want to change the base?
Conversation
Maybe there should be a way to tell Trio "hey I don't want the worker threads anymore, please kill them!", especially in light of the new deprecation warning (ATM the way to do that is to do That's not what this PR does! Counterpoint: what if a thread is currently doing work (no guarantees even outside of a |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3200 +/- ##
===============================================
Coverage 100.00000% 100.00000%
===============================================
Files 124 124
Lines 18792 18818 +26
Branches 1268 1270 +2
===============================================
+ Hits 18792 18818 +26
|
coverage fail appears to be nedbat/coveragepy#310 |
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 if I completely understand the test for this, but the actual functionality changes look fine.
94d51b2
to
04845c8
Compare
Fixes #2764
While we don't provide any sort of guarantees and I think it's tempting to give up on this:
As long as people aren't initializing their own thread caches, this should be fine.