]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-135871: Reload lock internal state while spinning in `PyMutex_LockTimed` (gh-146064)
authorDaniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
Mon, 23 Mar 2026 20:55:06 +0000 (21:55 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Mar 2026 20:55:06 +0000 (16:55 -0400)
commitdaa159f98b3689ae6a587bfb978b931762f9dbc9
tree384c50d9ccdbdf01b9cac88adf06ab82cefbd396
parent821581adaeb3a04855be455c9d9eef1b830f71cd
gh-135871: Reload lock internal state while spinning in `PyMutex_LockTimed` (gh-146064)

Add atomic loads in the slow path of PyMutex to increase the number
of lock acquisitions per second that threads can make on a shared mutex.
Misc/NEWS.d/next/Core_and_Builtins/2026-03-19-16-16-40.gh-issue-135871.jSExZ3.rst [new file with mode: 0644]
Python/lock.c