mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Revert "bpo-36356: Destroy the GIL at exit (GH-12453)" (GH613006)
This reverts commit b36e5d627d
.
This commit is contained in:
parent
b36e5d627d
commit
99fcc616d4
5 changed files with 18 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue