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

Subinterpreter Pending Calls Never Run #104812

Closed
ericsnowcurrently opened this issue May 23, 2023 · 2 comments
Closed

Subinterpreter Pending Calls Never Run #104812

ericsnowcurrently opened this issue May 23, 2023 · 2 comments
Assignees
Labels
3.12 bugs and security fixes 3.13 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters type-bug An unexpected behavior, bug, or error

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented May 23, 2023

A while back we moved the pending calls to PyInterpreterState. Then in 2020 we made it so pending calls would only run in the main thread of the main interpreter. Doing so renders the per-interpreter pending calls state pointless and prevents us from making use of pending calls for subinterpreters.

Linked PRs

@ericsnowcurrently ericsnowcurrently added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters 3.12 bugs and security fixes 3.13 new features, bugs and security fixes labels May 23, 2023
@ericsnowcurrently ericsnowcurrently self-assigned this May 23, 2023
@ericsnowcurrently
Copy link
Member Author

We also need to look at how to handle overflow when the number of pending calls reaches NPENDINGCALLS, whether bumping the number, or moving to a linked list, or something else.

@ericsnowcurrently
Copy link
Member Author

maybe related: gh-84412

ericsnowcurrently added a commit that referenced this issue Jun 13, 2023
For a while now, pending calls only run in the main thread (in the main interpreter).  This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run.
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this issue Jun 13, 2023
For a while now, pending calls only run in the main thread (in the main interpreter).  This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run.
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this issue Jun 13, 2023
For a while now, pending calls only run in the main thread (in the main interpreter).  This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run.
ericsnowcurrently added a commit that referenced this issue Jun 14, 2023
ericsnowcurrently added a commit that referenced this issue Jun 14, 2023
)

For a while now, pending calls only run in the main thread (in the main interpreter).  This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run.
(cherry picked from commit 757b402)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

1 participant