[issue23394] No garbage collection at end of main thread
Irit Katriel
report at bugs.python.org
Wed Jun 16 11:21:24 EDT 2021
Irit Katriel <iritkatriel at yahoo.com> added the comment:
For the use case you describe, you could add a close() function to your library so that callers can make shutdown explicit, or if you want it to remain implicit you could use daemon threads which terminate when the main thread exits.
Relying on GC to release objects which then close non-daemonic threads from __del__ doesn't sound like a robust design to me.
----------
nosy: +iritkatriel
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23394>
_______________________________________
More information about the Python-bugs-list
mailing list