mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
gh-104812: Run Pending Calls in any Thread (gh-104813)
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.
This commit is contained in:
parent
4e80082723
commit
757b402ea1
16 changed files with 766 additions and 123 deletions
|
|
@ -60,14 +60,6 @@ _Py_ThreadCanHandleSignals(PyInterpreterState *interp)
|
|||
}
|
||||
|
||||
|
||||
/* Only execute pending calls on the main thread. */
|
||||
static inline int
|
||||
_Py_ThreadCanHandlePendingCalls(void)
|
||||
{
|
||||
return _Py_IsMainThread();
|
||||
}
|
||||
|
||||
|
||||
/* Variable and static inline functions for in-line access to current thread
|
||||
and interpreter state */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue