gh-117721: use PyMutex in _thread.lock#125110
Conversation
colesbury
left a comment
There was a problem hiding this comment.
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:
PyMutexinstead ofPyThread_type_lockPy_TPFLAGS_MANAGED_WEAKREF_thread.lock.release()is not thread-safe in free-threaded builds #117721