New submission from Kristján Valur Jónsson <krist...@ccpgames.com>:

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.

----------
components: Interpreter Core
files: gccallback1.patch
keywords: patch
messages: 122795
nosy: krisvale
priority: normal
severity: normal
status: open
title: Add a progress callback to gcmodule
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file19869/gccallback1.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to