diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-06-14 00:50:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 00:50:08 (GMT) |
commit | 33d3069c45bda38f52053a115e3c0810cd631dd6 (patch) | |
tree | ee49a043f3960473e891ce9a1a4be3abee2a878c /Include/cpython | |
parent | 75239d5ec1505b8f9f20d3c2d366c1a3ebd269aa (diff) | |
download | cpython-33d3069c45bda38f52053a115e3c0810cd631dd6.zip cpython-33d3069c45bda38f52053a115e3c0810cd631dd6.tar.gz cpython-33d3069c45bda38f52053a115e3c0810cd631dd6.tar.bz2 |
[3.12] gh-104812: Run Pending Calls in any Thread (gh-104813) (gh-105752)
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)
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/ceval.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/cpython/ceval.h b/Include/cpython/ceval.h index 0fbbee1..a9616bd 100644 --- a/Include/cpython/ceval.h +++ b/Include/cpython/ceval.h @@ -22,6 +22,8 @@ PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _P PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds); PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void); +PyAPI_FUNC(int) _PyEval_MakePendingCalls(PyThreadState *); + PyAPI_FUNC(Py_ssize_t) PyUnstable_Eval_RequestCodeExtraIndex(freefunc); // Old name -- remove when this API changes: _Py_DEPRECATED_EXTERNALLY(3.12) static inline Py_ssize_t |