Skip to content

[3.14] gh-144513: Skip critical section locking during stop-the-world (gh-144524) - #145570

Merged
colesbury merged 1 commit into
python:3.14from
colesbury:backport-0fdf6a9-3.14
Mar 6, 2026
Merged

[3.14] gh-144513: Skip critical section locking during stop-the-world (gh-144524)#145570
colesbury merged 1 commit into
python:3.14from
colesbury:backport-0fdf6a9-3.14

Conversation

@colesbury

@colesburycolesbury commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

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.

@colesburycolesbury changed the title gh-144513: Skip critical section locking during stop-the-world (gh-144524)[3.14] gh-144513: Skip critical section locking during stop-the-world (gh-144524)Mar 5, 2026
…-world (pythongh-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.
(cherry picked from commit 0fdf6a9)
@colesbury
colesburyforce-pushed the backport-0fdf6a9-3.14 branch from 17a8e1a to c137691CompareMarch 5, 2026 20:50
@colesbury
colesbury marked this pull request as ready for review March 5, 2026 21:56
@colesbury
colesbury merged commit 7b9508f into python:3.14Mar 6, 2026
51 checks passed
@colesbury
colesbury deleted the backport-0fdf6a9-3.14 branch March 6, 2026 17:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@colesbury