Multiprocessing.Queue - I want to end.

Roel Schroeven rschroev_nospam_ml at
Sat May 2 20:19:29 CEST 2009

Hendrik van Rooyen schreef:
> : "Roel Schroeven" <rschroev_nospam_ml at> wrote:

>> ...

> This is all true in the case of a job that starts, runs and finishes.
> I am not so sure it applies to something that has a long life.

It's true that I'm talking about work units with relatively short
lifetimes, mostly a few seconds but perhaps maximum about ten minutes. I
assumed that queues are mostly used for that kind of stuff. I've never
really thought about cases where that assumption doesn't hold, so it's
very well possible that all I've said is invalid in other cases.

>>> And if the stuff you pass around needs disparate effort to consume,
>>> it seems to me that you can more easily balance the load by having
>>> specialised consumers, instead of instances of one humungous 
>>> "I can eat anything" consumer.
>> If there is a semantic difference, maybe yes; but I think it makes no
>> sense to differentiate purely on the expected execution times.
> The idea is basically that you have the code that classifies in one
> place only, instead of running in all the instances of the consumer.
> Feels better to me, somehow.

I most cases that I can imagine (and certainly in all cases I've used),
no classification whatsoever is even needed.

The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
  -- Isaac Asimov

Roel Schroeven

More information about the Python-list mailing list