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 pitrou
Recipients martin.panter, nascheme, neologix, nikratio, nitishch, pitrou, serhiy.storchaka, tim.peters, vstinner, xgdomingo
Date 2017-12-20.19:30:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513798257.65.0.213398074469.issue17852@psf.upfronthosting.co.za>
In-reply-to
Content
Here's another idea: have a new type field (a tp_something) that exposes the GC priority for this type.  It could be an integer between -8 and 7, for example (0 being the default).  Then tp_finalize would be called in sorted priority order.

The tricky part of course is to make this acceptable performance-wise (i.e. avoid walking the collectable list 16 times, once for each priority level).  For example by creating bucket lists for each priority level (only for objects with a non-NULL tp_finalize).
History
Date User Action Args
2017-12-20 19:30:57pitrousetrecipients: + pitrou, tim.peters, nascheme, vstinner, nikratio, neologix, martin.panter, serhiy.storchaka, xgdomingo, nitishch
2017-12-20 19:30:57pitrousetmessageid: <1513798257.65.0.213398074469.issue17852@psf.upfronthosting.co.za>
2017-12-20 19:30:57pitroulinkissue17852 messages
2017-12-20 19:30:57pitroucreate