summaryrefslogtreecommitdiff
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index ccd0427a14..5480fbacaf 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -188,20 +188,26 @@ PyEval_InitThreads(void)
}
}
+
void
_PyEval_FiniThreads(void)
{
+ if (_PyRuntime.ceval.pending.lock != NULL) {
+ PyThread_free_lock(_PyRuntime.ceval.pending.lock);
+ _PyRuntime.ceval.pending.lock = NULL;
+ }
+}
+
+
+void
+_PyEval_FiniThreads2(void)
+{
if (!gil_created()) {
return;
}
destroy_gil();
assert(!gil_created());
-
- if (_PyRuntime.ceval.pending.lock != NULL) {
- PyThread_free_lock(_PyRuntime.ceval.pending.lock);
- _PyRuntime.ceval.pending.lock = NULL;
- }
}
static inline void