Skip to content

gh-113743: Use per-interpreter locks for types - #115541

Merged
DinoV merged 1 commit into
python:mainfrom
DinoV:nogil_type_mro_per_interp
Feb 16, 2024
Merged

DinoV merged 1 commit into
python:mainfrom
DinoV:nogil_type_mro_per_interp

Conversation

@DinoV

@DinoV DinoV commented Feb 15, 2024 •

Copy link
Copy Markdown
Contributor

The global lock causes heavy contention in test_interpreters, this moves it to be per-interpreter. This makes _PyStaticType_InitBuiltin not entirely thread safe anymore, but that can be dealt with later.

@DinoV
DinoV force-pushed the nogil_type_mro_per_interp branch from 00aa303 to a60b688 Compare February 15, 2024 23:27
@DinoV
DinoV marked this pull request as ready for review February 16, 2024 00:08
@DinoV
DinoV requested a review from colesbury February 16, 2024 00:08
@DinoV DinoV changed the title gh-113743: Nogil type mro per interp Feb 16, 2024
@DinoV
DinoV merged commit 454d796 into python:main Feb 16, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Move type-lock to per-interpreter lock to avoid heavy contention in interpreters test
@DinoV
DinoV deleted the nogil_type_mro_per_interp branch May 31, 2024 18:23
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
Move type-lock to per-interpreter lock to avoid heavy contention in interpreters test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants