Quoting Dennis Lee Bieber <wlfr...@ix.netcom.com>:

>       I'm not familiar with the multiprocessing module and its queues but,
> presuming it behaves similar to the threading module AND that you have
> design control over the consumers (as you did in the sample) make a
> minor change.
> 
>       queue.put(None) ONCE in the producer
> 
>       Then, in the consumer, after it sees the None and begins shutdown
> processing, have the consumer ALSO do
> 
>       queue.put(None)
> 

Thank you. I went with this idea, only that instead of modifying the consumer, I
modified the queue itself... Well, Cameron Simpson did :D. It's working nicely 
now.

-- 
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie

-- 
Participe en Universidad 2010, del 8 al 12 de febrero de 2010
La Habana, Cuba 
http://www.universidad2010.cu

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to