Author kristjan.jonsson
Recipients kristjan.jonsson
Date 2010-07-02.11:30:07
SpamBayes Score 0.00495564
Marked as misclassified No
Message-id <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za>
In-reply-to
Content
The GC module currently relies only on the presence of a __del__ method to decide if an object can be safely collected at all.  Also, there is a special case for generator objects.

This patch allows any object to call an api during its traversal,
PyObject_GC_Collectable(), to indicate whether it is fit to be collected at this time, overriding any presence of a __del__ method or not.

This mechanism is being put in place in stackless python 2.7 because tasklets cannot always be collected depending on their runtime state, and I thought this might be a useful addition for regular python, especially since there already is such a dynamic special case for generator objects.
History
Date User Action Args
2010-07-02 11:30:12kristjan.jonssonsetrecipients: + kristjan.jonsson
2010-07-02 11:30:12kristjan.jonssonsetmessageid: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za>
2010-07-02 11:30:10kristjan.jonssonlinkissue9141 messages
2010-07-02 11:30:09kristjan.jonssoncreate