mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Don't run garbage collection on interpreter exit if it was explicitly disabled
by the user.
This commit is contained in:
parent
9e3ef52a35
commit
fef7e94fa1
3 changed files with 14 additions and 4 deletions
|
@ -1596,6 +1596,15 @@ PyGC_Collect(void)
|
|||
return n;
|
||||
}
|
||||
|
||||
Py_ssize_t
|
||||
_PyGC_CollectIfEnabled(void)
|
||||
{
|
||||
if (!enabled)
|
||||
return 0;
|
||||
|
||||
return PyGC_Collect();
|
||||
}
|
||||
|
||||
Py_ssize_t
|
||||
_PyGC_CollectNoFail(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue