summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-29 11:04:07 (GMT)
committerGitHub <noreply@github.com>2019-04-29 11:04:07 (GMT)
commit99fcc616d400cd31af0733c3f8cc93bcc1d32a44 (patch)
tree0081a47a3cae0a556affff285079a9361c5b8c45 /Python/ceval.c
parentb36e5d627d4232a01850707eb78a5067f3fd77f4 (diff)
downloadcpython-99fcc616d400cd31af0733c3f8cc93bcc1d32a44.zip
cpython-99fcc616d400cd31af0733c3f8cc93bcc1d32a44.tar.gz
cpython-99fcc616d400cd31af0733c3f8cc93bcc1d32a44.tar.bz2
Revert "bpo-36356: Destroy the GIL at exit (GH-12453)" (GH613006)
This reverts commit b36e5d627d4232a01850707eb78a5067f3fd77f4.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 5480fba..ccd0427 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -188,26 +188,20 @@ 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