mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36710: Add runtime parameter to _PyThreadState_Init() (GH-12935)
* Add 'runtime' parameter to _PyThreadState_Init() * Add 'gilstate' parameter to _PyGILState_NoteThreadState() * Move _PyThreadState_Init() and _PyThreadState_DeleteExcept() to the internal C API.
This commit is contained in:
parent
6c44fde3e0
commit
8bb3230149
4 changed files with 95 additions and 82 deletions
|
@ -994,7 +994,7 @@ t_bootstrap(void *boot_raw)
|
|||
|
||||
tstate = boot->tstate;
|
||||
tstate->thread_id = PyThread_get_thread_ident();
|
||||
_PyThreadState_Init(tstate);
|
||||
_PyThreadState_Init(&_PyRuntime, tstate);
|
||||
PyEval_AcquireThread(tstate);
|
||||
tstate->interp->num_threads++;
|
||||
res = PyObject_Call(boot->func, boot->args, boot->keyw);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue