Skip to content

[3.14] gh-145685: Stop the world when updating MRO of existing types (gh-145707) - #145715

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

[3.14] gh-145685: Stop the world when updating MRO of existing types (gh-145707)#145715
colesbury merged 1 commit into
python:3.14from
colesbury:backport-0b65c88-3.14

Conversation

@colesbury

@colesburycolesbury commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

We already have a stop-the-world pause elsewhere in this code path (type_set_bases) and this makes will make it easier to avoid contention on the TYPE_LOCK when looking up names in the MRO hierarchy.

Also use deferred reference counting for non-immortal MROs.
(cherry picked from commit 0b65c88)

…types (pythongh-145707)
We already have a stop-the-world pause elsewhere in this code path
(type_set_bases) and this makes will make it easier to avoid contention
on the TYPE_LOCK when looking up names in the MRO hierarchy.
Also use deferred reference counting for non-immortal MROs.
(cherry picked from commit 0b65c88)
Co-authored-by: Sam Gross <colesbury@gmail.com>
@colesbury
colesbury marked this pull request as ready for review March 10, 2026 01:07
@colesbury
colesbury merged commit 5402465 into python:3.14Mar 10, 2026
51 checks passed
@colesbury
colesbury deleted the backport-0b65c88-3.14 branch March 10, 2026 13:31
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