[issue21351] refcounts not respected at process exit
Tim Peters
report at bugs.python.org
Sun Apr 27 03:01:14 CEST 2014
Tim Peters added the comment:
After more thought, I don't think the user can do anything to influence finalization order in cases like this, short of adding "del" statements (or moral equivalents) to break cycles before the interpreter shuts down.
Fine by me ;-) Something CPython could do, when collecting cyclic trash, is pick on objects with the smallest refcount first. That would most often mimic the finalization-order effects of the old bind-module-globals-to-None hack. But it would require more code and more expense to impose a partial order, and would still be an implementation detail specific to CPython (the implementation, as opposed to Python the language).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21351>
_______________________________________
More information about the Python-bugs-list
mailing list