-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-126907: Use a list for atexit
callbacks
#127935
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
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.
I like the overall change. Here is a first review.
Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
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.
LGTM
Co-authored-by: Victor Stinner <[email protected]>
Congrats @ZeroIntensity for this nice fix! |
…127935) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
…127935) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
…127935) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
Should this be backported or is it not worth it? |
To 3.13? I don't think it's worth risking breakage. |
cc @colesbury, @vstinner, @kumaraditya303
This is an alternative to gh-126908, and I'm a lot happier with this. Sam's suggestion of using a list turned out to be pretty nice, with the exception of
unregister
being a little wonky. I suspect we could improve that a little by adding a private API for removing from a list more cleanly, but that's work for later. FWIW, both this PR and the other one will have trouble backporting due to the runtime structure changing size.atexit
from threads in free-threading build segfaults #126907