Revert "bpo-36356: Destroy the GIL at exit (GH-12453)" (GH613006)

This reverts commit b36e5d627d.
This commit is contained in:
Victor Stinner 2019-04-29 13:04:07 +02:00 committed by GitHub
parent b36e5d627d
commit 99fcc616d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 26 deletions

View file

@ -188,19 +188,8 @@ 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;
@ -208,6 +197,11 @@ _PyEval_FiniThreads2(void)
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