use of Queue

skip at pobox.com skip at pobox.com
Wed Aug 27 06:11:56 EDT 2008


    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



More information about the Python-list mailing list