-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-104812: Run Pending Calls in any Thread #104813
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
Merged
ericsnowcurrently
merged 33 commits into
python:main
from
ericsnowcurrently:per-interpreter-pending-calls
Jun 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
6e46450
Clear each pending call when popping it.
ericsnowcurrently 3b18b7d
Call _Py_FinishPendingCalls() in Py_EndInterpreter().
ericsnowcurrently f8b483f
Factor out has_pending_calls().
ericsnowcurrently 44df0bc
Skip the calls_to_do check in _Py_FinishPendingCalls().
ericsnowcurrently e2a0281
Factor out _PyEval_MakePendingCalls().
ericsnowcurrently 61e5d3e
Explicitly restrict Py_MakePendingCalls() to the main thread.
ericsnowcurrently 5af09f2
Factor out _make_pending_calls().
ericsnowcurrently 72cc242
Add the mainthreadonly arg to _PyEval_AddPendingCall().
ericsnowcurrently 88f7757
Always use the main interpreter for Py_AddPendingCall().
ericsnowcurrently d24fafb
Add _PyRuntime.ceval.pending_mainthread.
ericsnowcurrently 1701fa3
Run per-interpreter pending calls in any thread.
ericsnowcurrently c6cfaca
Drop _Py_ThreadCanHandlePendingCalls().
ericsnowcurrently dc11024
Expand the handle_eval_breaker comment.
ericsnowcurrently 6c3d06c
Do not require faulthandler for test.support.threading_helper.start_t…
ericsnowcurrently 69ff9e6
Add tests.
ericsnowcurrently fdde46d
Add a NEWS entry.
ericsnowcurrently d9924b4
Merge branch 'main' into per-interpreter-pending-calls
ericsnowcurrently c1fb647
Skip the test if subinterpreters not supported.
ericsnowcurrently
Adjust UNSIGNAL_PENDING_CALLS().
ericsnowcurrently 2fabab7
Be more careful in make_pending_calls().
ericsnowcurrently 8445fc0
The main thread may be used by subinterpreters.
ericsnowcurrently a83a321
Factor out _next_pending_call().
ericsnowcurrently aca2a8c
has_pending_calls() -> maybe_has_pending_calls().
ericsnowcurrently fbf92e0
Merge branch 'main' into per-interpreter-pending-calls
ericsnowcurrently 93e61c5
Merge branch 'main' into per-interpreter-pending-calls
ericsnowcurrently 3e1bc1f
Merge branch 'main' into per-interpreter-pending-calls
ericsnowcurrently 7b8b8da
Drop a dead import.
ericsnowcurrently 90b3a1f
Clarify some comments.
ericsnowcurrently 4f0068d
Add timeouts.
ericsnowcurrently d5d7b42
Implement the remaining tests.
ericsnowcurrently 37d41cc
Drop prints.
ericsnowcurrently fc25a85
Ignore the global variable.
ericsnowcurrently 177f161
Clarify comments.
ericsnowcurrently File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Always use the main interpreter for Py_AddPendingCall().
- Loading branch information
commit 88f77574b6d8a4cc1daed18eb1db449df3ba5249
There are no files selected for viewing
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clarify?
This means the "the main thread of the main interpreter", not the "the main thread of the current interpreter"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done