]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-150902: Optimize PyCriticalSection2 to skip locking the same locks held...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 19 Jun 2026 13:51:55 +0000 (15:51 +0200)
committerGitHub <noreply@github.com>
Fri, 19 Jun 2026 13:51:55 +0000 (09:51 -0400)
commitc1104577bf1cb3b78118989afed73a89a8d71fed
tree3222345cb6e9dfa71d4e1350ad219e2165796b93
parent8fff472ec18973e82d674f4d471903b84026e59f
[3.14] gh-150902: Optimize PyCriticalSection2 to skip locking the same locks held by the current CS2 (gh-151555)

This mimics an optimization already present for the single-mutex critical section.
(cherry picked from commit c2ca7724af94df6e078a4b2e86d1be8c410d9940)

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
Include/internal/pycore_critical_section.h
Misc/NEWS.d/next/Core_and_Builtins/2026-06-08-13-14-42.gh-issue-150902.-CWZ66.rst [new file with mode: 0644]
Python/critical_section.c