Message109804
| Author |
pitrou |
| Recipients |
amaury.forgeotdarc, kristjan.jonsson, loewis, pitrou, stutzbach, tim.peters |
| Date |
2010年07月09日.22:58:51 |
| SpamBayes Score |
0.024169456 |
| Marked as misclassified |
No |
| Message-id |
<1278716333.3.0.342859957379.issue9141@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> The particular case is this: I have objects (tasklets) that depending
> on their runtime state, need to run a finalizer or not. If not, they
> can be collected. If they do, then they end up on gc.garbage.
But why don't you try using tp_dealloc as I suggested instead? It will allow you to run a finalizer in all cases, without anything ending up in gc.garbage. It's what we do in the new io lib.
Also, I'm still worried that the mechanism you're proposing is a bit quirky. I hope other developers can give opinions or even suggestions.
> But since these patches of mine seem to be met with rather limited
> enthusiasm, I wonder if I should be bothering.
Well, the GC is a rather delicate affair and moreover it doesn't have a dedicated maintainer. That doesn't mean your patches are not interesting, but I think everyone tries to be very careful with that area of the code. |
|