diff --git a/Misc/ACKS b/Misc/ACKS index 7109ccbe851384..b8bac248d98867 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -552,6 +552,7 @@ Eric Groo Daniel Andrade Groppe Dag Gruneau Filip GruszczyƄski +Andrii Grynenko Grzegorz Grzywacz Thomas Guettler Yuyang Guo diff --git a/Python/pystate.c b/Python/pystate.c index 65c244e6f73617..ccb0092c42b3a4 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -743,6 +743,10 @@ _PyGILState_Fini(void) void _PyGILState_Reinit(void) { +#ifdef WITH_THREAD + head_mutex = NULL; + HEAD_INIT(); +#endif PyThreadState *tstate = PyGILState_GetThisThreadState(); PyThread_delete_key(autoTLSkey); if ((autoTLSkey = PyThread_create_key()) == -1)