-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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-99113: Add PyInterpreterConfig.own_gil #104204
Merged
ericsnowcurrently
merged 2 commits into
python:main
from
ericsnowcurrently:interp-config-own-gil
May 5, 2023
Merged
gh-99113: Add PyInterpreterConfig.own_gil #104204
ericsnowcurrently
merged 2 commits into
python:main
from
ericsnowcurrently:interp-config-own-gil
May 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced May 5, 2023
ericsnowcurrently
force-pushed
the
interp-config-own-gil
branch
from
May 5, 2023 19:26
7781268
to
8d1db5d
Compare
ericsnowcurrently
requested review from
brettcannon,
encukou,
ncoghlan and
warsaw
as code owners
May 5, 2023 19:26
ericsnowcurrently
added a commit
that referenced
this pull request
May 5, 2023
ericsnowcurrently
force-pushed
the
interp-config-own-gil
branch
from
May 5, 2023 21:14
8d1db5d
to
37bf29c
Compare
erlend-aasland
approved these changes
May 5, 2023
carljm
added a commit
to carljm/cpython
that referenced
this pull request
May 5, 2023
* main: pythongh-99113: Add PyInterpreterConfig.own_gil (pythongh-104204) pythongh-104146: Remove unused var 'parser_body_declarations' from clinic.py (python#104214) pythongh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (pythongh-104205) pythongh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (pythongh-104148) pythongh-99113: Share the GIL via PyInterpreterState.ceval.gil (pythongh-104203) pythonGH-100479: Add `pathlib.PurePath.with_segments()` (pythonGH-103975) pythongh-69152: Add _proxy_response_headers attribute to HTTPConnection (python#26152) pythongh-103533: Use PEP 669 APIs for cprofile (pythonGH-103534) pythonGH-96803: Add three C-API functions to make _PyInterpreterFrame less opaque for users of PEP 523. (pythonGH-96849)
jbower-fb
pushed a commit
to jbower-fb/cpython-jbowerfb
that referenced
this pull request
May 8, 2023
…4205) Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in pythongh-104206 (once PyInterpreterState.ceval.own_gil is added in pythongh-104204).
jbower-fb
pushed a commit
to jbower-fb/cpython-jbowerfb
that referenced
this pull request
May 8, 2023
We also add PyInterpreterState.ceval.own_gil to record if the interpreter actually has its own GIL. Note that for now we don't actually respect own_gil; all interpreters still share the one GIL. However, PyInterpreterState.ceval.own_gil does reflect PyInterpreterConfig.own_gil. That lie is a temporary one that we will fix when the GIL really becomes per-interpreter.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We also add
PyInterpreterState.ceval.own_gil
to record if the interpreter actually has its own GIL.Note that for now we don't actually respect
own_gil
; all interpreters still share the one GIL. However,PyInterpreterState.ceval.own_gil
does reflectPyInterpreterConfig.own_gil
. That lie is a temporary one that we will fix when the GIL really becomes per-interpreter.(This change is broken out from #99114.)