[issue32850] Run gc_collect() before complaining about dangling threads

Matthias Urlichs report at bugs.python.org
Thu Feb 15 09:12:42 EST 2018


Matthias Urlichs <smurf at smurf.noris.de> added the comment:

Upon further consideration (and following the observation that my test cases no longer block for two seconds each after applying the first version of this patch): we do not want to clear the reference to "dangling_threads" since that's a weakset. We want to clear the "thread" variable, which holds a reference to a random member of that set, which will arbitrarily block the cleanup loop from ever succeeding.

Updated patch attached.

----------
Added file: https://bugs.python.org/file47446/gc.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32850>
_______________________________________


More information about the Python-bugs-list mailing list