Message204439
This would be useful. It shouldn't be part of atexit, since atexit.register() from a thread should register a process-exit handler; instead, something like threading.(un)register_atexit(). If called in a thread, the calls happen when run() returns; if called in the main thread, call them when regular atexits are called (perhaps interleaved with atexit, as if atexit.register had been used).
For example, this can be helpful to handle cleaning up per-thread singletons like database connections. |
|
Date |
User |
Action |
Args |
2013-11-25 23:48:42 | Glenn.Maynard | set | recipients:
+ Glenn.Maynard, pitrou, tarek, grahamd, zvezdan, neologix |
2013-11-25 23:48:42 | Glenn.Maynard | set | messageid: <1385423322.16.0.636994159388.issue14073@psf.upfronthosting.co.za> |
2013-11-25 23:48:42 | Glenn.Maynard | link | issue14073 messages |
2013-11-25 23:48:42 | Glenn.Maynard | create | |
|