Message308787
| 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). |
|