-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-117721: use PyMutex in _thread.lock
#125110
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.
LGTM. Minor comments below
@kumaraditya303, see #125058. We should check if this makes |
It doesn't, it is not interruptible. |
Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @kumaraditya303, I could not cleanly backport this to
|
GH-125116 is a backport of this pull request to the 3.13 branch. |
(cherry picked from commit fca5529)
This change introduced a regression: #125451. |
IMO this change should not be backported to 3.13 in a bugfix release. It's too big, it can cause regression as you can see. |
I don't think there's a bug in |
Changes:
PyMutex
instead ofPyThread_type_lock
Py_TPFLAGS_MANAGED_WEAKREF
_thread.lock.release()
is not thread-safe in free-threaded builds #117721