]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] 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:52:07 +0000 (15:52 +0200)
committerGitHub <noreply@github.com>
Fri, 19 Jun 2026 13:52:07 +0000 (09:52 -0400)
commit80d7626c74c1e455a9a2e0d34a06bf29b9970487
treed7d1079c36b538bcf43347754233317380741815
parentb010116e26bda41acbe6de54225266f5d02a3c1e
[3.15] gh-150902: Optimize PyCriticalSection2 to skip locking the same locks held by the current CS2 (gh-151554)

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