mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
bpo-36710: Add runtime variable to Py_FinalizeEx() (GH-12937)
* Add a 'runtime' variable to Py_FinalizeEx() rather than working directly on the global variable _PyRuntime * Add a 'runtime' parameter to _PyGC_Fini(), _PyGILState_Fini() and call_ll_exitfuncs()
This commit is contained in:
parent
70bf713617
commit
8e91c246e4
4 changed files with 29 additions and 24 deletions
|
@ -1078,10 +1078,11 @@ _PyGILState_GetInterpreterStateUnsafe(void)
|
|||
}
|
||||
|
||||
void
|
||||
_PyGILState_Fini(void)
|
||||
_PyGILState_Fini(_PyRuntimeState *runtime)
|
||||
{
|
||||
PyThread_tss_delete(&_PyRuntime.gilstate.autoTSSkey);
|
||||
_PyRuntime.gilstate.autoInterpreterState = NULL;
|
||||
struct _gilstate_runtime_state *gilstate = &runtime->gilstate;
|
||||
PyThread_tss_delete(&gilstate->autoTSSkey);
|
||||
gilstate->autoInterpreterState = NULL;
|
||||
}
|
||||
|
||||
/* Reset the TSS key - called by PyOS_AfterFork_Child().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue