Diez> Put a sentinel into the queue that gets interpreted as "terminate" Diez> for the workers. You need of course to put it in there once for Diez> each worker.
Or make the consumers daemon threads so that when the producers are finished an all non-daemon threads exit, the consumers do as well. Skip -- http://mail.python.org/mailman/listinfo/python-list