Howto wait for multiple queues (Queue.py)?

Andreas Ames andreas.ames at tenovis.com
Thu Nov 21 05:01:08 EST 2002


Skip Montanaro <skip at pobox.com> writes:

> How about you maintain a single Queue which holds the other Queues?  When a
> Queue goes empty it gets removed from the main Queue.  When something is
> put() into it, it's added to the main Queue if it's not already there.  Your
> consumers then wait on the main Queue.

I think this would be another possibility which would probably look
similar to alternative 3 in my post.  My main concern is the
performance of this approach as the queue is one of *the* central
concepts in my server.


Thanks,

andreas




More information about the Python-list mailing list