This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients kristjan.jonsson
Date 2010-11-29.12:33:06
SpamBayes Score 0.0006646679
Marked as misclassified No
Message-id <1291033990.01.0.373880351287.issue10576@psf.upfronthosting.co.za>
In-reply-to
Content
As discussed here: http://mail.python.org/pipermail/python-ideas/2010-November/008813.html:

Adding the ability to register callbacks to be invoked before and after garbage collection runs.  This can be used to gather run-time statistics such as timing information and frequency of garbage collection runs, and to perform application-specific cleanup of uncollecatable objects from gc.garbage.

The first patch is the code as currently in use in our codebase at CCP (ported from 2.7).  There is only one callback registered and the callback signature is perhaps a bit lame.  Also, no error checking.  But it is shown here for reference and as a basis for discussion.
History
Date User Action Args
2010-11-29 12:33:10kristjan.jonssonsetrecipients: + kristjan.jonsson
2010-11-29 12:33:10kristjan.jonssonsetmessageid: <1291033990.01.0.373880351287.issue10576@psf.upfronthosting.co.za>
2010-11-29 12:33:06kristjan.jonssonlinkissue10576 messages
2010-11-29 12:33:06kristjan.jonssoncreate