Re: Multiprocessing problem with producer/consumer

2009-05-28 Thread MRAB
Wu Zhe wrote: I am writing a server program with one producer and multiple consumers, what confuses me is only the first task producer put into the queue gets consumed, after which tasks enqueued no longer get consumed, they remain in the queue forever. from multiprocessing import Process, Pool,

Re: Multiprocessing problem with producer/consumer

2009-05-27 Thread Piet van Oostrum
> Wu Zhe (WZ) wrote: >WZ> I am writing a server program with one producer and multiple consumers, >WZ> what confuses me is only the first task producer put into the queue gets >WZ> consumed, after which tasks enqueued no longer get consumed, they remain >WZ> in the queue forever. >WZ> from m

Multiprocessing problem with producer/consumer

2009-05-27 Thread Wu Zhe
I am writing a server program with one producer and multiple consumers, what confuses me is only the first task producer put into the queue gets consumed, after which tasks enqueued no longer get consumed, they remain in the queue forever. from multiprocessing import Process, Pool, Queue, cpu_cou