Guido van Rossum added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21163>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to