-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
test and eliminate additional sources of cyclic garbage #2063
test and eliminate additional sources of cyclic garbage #2063
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2063 +/- ##
=======================================
Coverage 99.56% 99.56%
=======================================
Files 114 114
Lines 14634 14688 +54
Branches 1119 1120 +1
=======================================
+ Hits 14570 14624 +54
Misses 43 43
Partials 21 21
|
I haven't been keeping an eye on this lately, but I don't think it came up. Generally we try to avoid internal async API's that raise exceptions because multi-errors are so hard to deal with. |
Just noticed that |
acc34f7
to
f9d0e2a
Compare
I found a gross refcycle in the KI system. Here is the output of Note that the Lines 162 to 168 in f9d0e2a
an alternative solution might be to inline the |
maybe some change would make the checkpoint insufficient. weakref will notice that the nursery is still alive!
23e3b1c
to
f04ed69
Compare
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.
an alternative solution might be to inline the locals()["@TRIO_KI_PROTECTION_ENABLED"]=True in CancelScope.exit, as that is a special case; that way we don't have to run extra bytecode every time KI protection is toggled.
this is appealing-- perhaps add another commit implementing it and let njs weigh in
LGTM. Add a newsfragment and check that PR description matches latest changes? |
8ab2b4e
to
e48d638
Compare
from
MultiErrorCatcher.__exit__
,_multierror.copy_tb
,MultiError.filter
,CancelScope.__exit__
, andNurseryManager.__aexit__
methods. This was nearly impossible to catch until #1864 landed so it wasn't cleaned up in #1805 (or during the live stream: https://www.youtube.com/watch?v=E_jvJVYXUAk).@belm0: curious if this shows up in your application benchmarking.