Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

DinoV
Copy link
Contributor

@DinoV DinoV commented Feb 15, 2024

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 changed the title Nogil type mro per interp gh-113743: Nogil type mro per interp Feb 15, 2024
@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 gh-113743: Use per-interpreter locks for types Feb 16, 2024
@DinoV DinoV merged commit 454d796 into python:main Feb 16, 2024
36 checks passed
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
Sign up for free to 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.

2 participants