Message 204439 - Python tracker

Message204439

Author Glenn.Maynard
Recipients Glenn.Maynard, grahamd, neologix, pitrou, tarek, zvezdan
Date 2013-11-25.23:48:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385423322.16.0.636994159388.issue14073@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-11-25 23:48:42Glenn.Maynardsetrecipients: + Glenn.Maynard, pitrou, tarek, grahamd, zvezdan, neologix
2013-11-25 23:48:42Glenn.Maynardsetmessageid: <1385423322.16.0.636994159388.issue14073@psf.upfronthosting.co.za>
2013-11-25 23:48:42Glenn.Maynardlinkissue14073 messages
2013-11-25 23:48:42Glenn.Maynardcreate