PyOS_AfterFork_Child() pass tstate to _PyEval_ReInitThreads() (GH-20598)

This commit is contained in:
Victor Stinner 2020-06-02 18:44:54 +02:00 committed by GitHub
parent 45b34a04a5
commit 317bab0bf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -436,10 +436,9 @@ PyEval_ReleaseThread(PyThreadState *tstate)
which are not running in the child process, and clear internal locks
which might be held by those threads. */
PyStatus
_PyEval_ReInitThreads(_PyRuntimeState *runtime)
_PyEval_ReInitThreads(PyThreadState *tstate)
{
PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime);
_Py_EnsureTstateNotNULL(tstate);
_PyRuntimeState *runtime = tstate->interp->runtime;
#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
struct _gil_runtime_state *gil = &tstate->interp->ceval.gil;