Why are "broken iterators" broken?
fredrik at pythonware.com
Mon Sep 22 18:32:35 CEST 2008
Cameron Simpson wrote:
>> you probably want the consumer thread to block when it catches up with
>> the producer, rather than exit.
> It sounds like he wants non-blocking behaviour in his consumer.
Roy gave an example, he didn't post a requirements specification.
> A common example is "try to gather a lot of stuff into a single packet,
> but send a smaller packet promptly if there isn't much stuff".
that use case is better solved with a plain list object. no need to
make things harder than they are.
More information about the Python-list