On Aug 27, 2:54 pm, Jeff <[EMAIL PROTECTED]> wrote: > Queue raises an Empty exception when there are no items left in the > queue. Put the q.get() call in a try block and exit in the except > block. Wrong. What if producer takes a long time to produce an item? Consumers will find the queue empty and exit instead of waiting.
> You can also use a condition variable to signal threads to terminate. This is the solution I want to avoid because it duplicates Queue's functionality. I prefer having a clean solution with nice design to hacking Queue class. -- http://mail.python.org/mailman/listinfo/python-list