]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-144513: Skip critical section locking during stop-the-world (gh-144524)
authorSam Gross <colesbury@gmail.com>
Fri, 6 Feb 2026 15:14:08 +0000 (10:14 -0500)
committerGitHub <noreply@github.com>
Fri, 6 Feb 2026 15:14:08 +0000 (15:14 +0000)
commit0fdf6a9a71f9b3c9adc0406542902e028431e7ca
treeb2053c99d5930cdbd6cb9e5df45b9c466e595e1b
parent5bb3bbb9c6a7c9043a04d0cc2e82c83747040788
gh-144513: Skip critical section locking during stop-the-world (gh-144524)

When the interpreter is in a stop-the-world pause, critical sections
don't need to acquire locks since no other threads can be running.
This avoids a potential deadlock where lock fairness hands off ownership
to a thread that has already suspended for stop-the-world.
Misc/NEWS.d/next/Core_and_Builtins/2026-02-05-13-30-00.gh-issue-144513.IjSTd7.rst [new file with mode: 0644]
Modules/_testinternalcapi/test_critical_sections.c
Python/critical_section.c