Message395933
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. |
|
Date |
User |
Action |
Args |
2021-06-16 15:21:24 | iritkatriel | set | recipients:
+ iritkatriel, pitrou, François.Trahan |
2021-06-16 15:21:24 | iritkatriel | set | messageid: <1623856884.03.0.304372182703.issue23394@roundup.psfhosted.org> |
2021-06-16 15:21:24 | iritkatriel | link | issue23394 messages |
2021-06-16 15:21:23 | iritkatriel | create | |
|