GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-99113: Add PyInterpreterConfig.own_gil by ericsnowcurrently · Pull Request #104204 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented May 5, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

(This change is broken out from #99114.)

  • Issue: Implement PEP 684: A Per-Interpreter GIL #99113

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ericsnowcurrently ericsnowcurrently added the skip news label May 5, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 5, 2023
Implement PEP 684: A Per-Interpreter GIL #99113
Closed
This was referenced May 5, 2023
gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED #104205
Merged
gh-99113: Add a check for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED #104206
Merged
gh-99113: Make Sure the GIL is Acquired at the Right Places #104208
Merged
gh-99113: A Per-Interpreter GIL! #99114
Closed
@ericsnowcurrently
ericsnowcurrently force-pushed the interp-config-own-gil branch from 7781268 to 8d1db5d Compare May 5, 2023 19:26
@ericsnowcurrently
ericsnowcurrently marked this pull request as ready for review May 5, 2023 19:26
@ericsnowcurrently
ericsnowcurrently requested review from brettcannon, encukou, ncoghlan and warsaw as code owners May 5, 2023 19:26
@ericsnowcurrently
ericsnowcurrently removed request for brettcannon, encukou, ncoghlan and warsaw May 5, 2023 19:26
ericsnowcurrently added a commit that referenced this pull request May 5, 2023
@ericsnowcurrently
gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)
a9c6e06
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 gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
ericsnowcurrently added 2 commits May 5, 2023 15:14
@ericsnowcurrently
Add _PyInterpreterConfig.own_gil.
a73f36f
@ericsnowcurrently
Use PyInterpreterConfig.own_gil.
37bf29c
@ericsnowcurrently
ericsnowcurrently force-pushed the interp-config-own-gil branch from 8d1db5d to 37bf29c Compare May 5, 2023 21:14
@bedevere-bot bedevere-bot added the awaiting core review label May 5, 2023
erlend-aasland
erlend-aasland approved these changes May 5, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 5, 2023
@ericsnowcurrently
ericsnowcurrently merged commit f3e7eb4 into python:main May 5, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 5, 2023
@ericsnowcurrently
ericsnowcurrently deleted the interp-config-own-gil branch May 5, 2023 21:59
carljm added a commit to carljm/cpython that referenced this pull request May 5, 2023
@carljm
Merge branch 'main' into inlinecomp2
baacf5f
* 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 that referenced this pull request May 8, 2023
@ericsnowcurrently @jbower-fb
pythongh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (pythongh-10…
7192a46
…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 that referenced this pull request May 8, 2023
@ericsnowcurrently @jbower-fb
pythongh-99113: Add PyInterpreterConfig.own_gil (pythongh-104204)
b057233
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

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ericsnowcurrently @erlend-aasland @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.