multiprocessing: pool with blocking queue

masher vertespain at
Thu Jul 2 12:25:54 EDT 2009

On Jul 2, 12:06 pm, J Kenneth King <ja... at> wrote:
> masher <vertesp... at> writes:
> > My questions, then, is: Is there a more elegant/pythonic way of doing
> > what I am trying to do with the current Pool class?
> Forgive me, I may not fully understand what you are trying to do here
> (I've never really used multiprocessing all that much)...
> But couldn't you just assign your own Queue object to the Pool instance?

That's basically my question. It does not appear as though there is
any straightforward way of doing this because of the design of Pool's
__init__ method, which passes _taskqueue to several functions. Hence,
even if I were to reassign _taskqueue after __init__, that wouldn't
change anything.

More information about the Python-list mailing list