summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index da2bb37..b7019e3 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -556,7 +556,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime,
return status;
}
- /* Create the GIL */
+ /* Create the GIL and the pending calls lock */
status = _PyEval_InitThreads(tstate);
if (_PyStatus_EXCEPTION(status)) {
return status;
@@ -1581,6 +1581,12 @@ new_interpreter(PyThreadState **tstate_p)
goto error;
}
+ /* Create the pending calls lock */
+ status = _PyEval_InitThreads(tstate);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+ }
+
*tstate_p = tstate;
return _PyStatus_OK();