summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2024-02-15 20:53:06 (GMT)
committerThomas Wouters <thomas@python.org>2024-02-15 20:53:06 (GMT)
commit26f23daa1ea30dea368f00c2131017cef2586adc (patch)
tree7baca7617b71747da914ebb655a6e00f46a56a00 /Python/pystate.c
parentc08c0679055d96c0397cf128bf7cc8134538b36a (diff)
parentae460d450ab854ca66d509ef6971cfe1b6312405 (diff)
downloadcpython-26f23daa1ea30dea368f00c2131017cef2586adc.zip
cpython-26f23daa1ea30dea368f00c2131017cef2586adc.tar.gz
cpython-26f23daa1ea30dea368f00c2131017cef2586adc.tar.bz2
Merge branch 'main' of https://github.com/python/cpython
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 08ec586..b1d1a08 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -395,6 +395,7 @@ _Py_COMP_DIAG_POP
&(runtime)->atexit.mutex, \
&(runtime)->audit_hooks.mutex, \
&(runtime)->allocators.mutex, \
+ &(runtime)->types.type_mutex, \
}
static void
@@ -499,6 +500,8 @@ _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime)
_PyMutex_at_fork_reinit(locks[i]);
}
+ _PyTypes_AfterFork();
+
/* bpo-42540: id_mutex is freed by _PyInterpreterState_Delete, which does
* not force the default allocator. */
if (_PyThread_at_fork_reinit(&runtime->interpreters.main->id_mutex) < 0) {