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 gvanrossum
Recipients giampaolo.rodola, gvanrossum, pitrou, richard.kiss, vstinner, yselivanov
Date 2014-04-05.23:05:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396739126.9.0.65229283833.issue21163@psf.upfronthosting.co.za>
In-reply-to
Content
Ouch. That example is very obfuscated -- I fail to understand what it is trying to accomplish. Running it I see that it always prints 100 for the count with 3.3 or DO_CG on; for me it prints 87 with 3.4 an DO_GC off. But I wouldn't be surprised if the reason calling do.collect() "fixes" whatever issue you have is that it causes there not to be any further collections until the next cycle through that main loop, and everything simply runs before being collected. But that's just a theory based on minimal understanding of the example.

I'm not sure that tasks are *supposed* to stay alive when there are no references to them. It seems that once they make it past a certain point they keep themselves alive.

One more thing: using a try/except I see that the "lost" consumers all get a GeneratorExit on their first iteration. You might want to look into this. (Sorry, gotta run, wanted to dump this.)
History
Date User Action Args
2014-04-05 23:05:26gvanrossumsetrecipients: + gvanrossum, pitrou, vstinner, giampaolo.rodola, yselivanov, richard.kiss
2014-04-05 23:05:26gvanrossumsetmessageid: <1396739126.9.0.65229283833.issue21163@psf.upfronthosting.co.za>
2014-04-05 23:05:26gvanrossumlinkissue21163 messages
2014-04-05 23:05:26gvanrossumcreate