On Mon, Mar 21, 2016 at 1:46 PM, Michael Welle <mwe012...@gmx.net> wrote:
> Wait on the result means to set a multiprocessing.Event if one of the
> consumers finds the sentinel task and wait for it on the producer? Hmm,
> that might be better than incrementing a counter. But still, it couples
> the consumers and the producer more than I like.

No, I mean calling AsyncResult.wait() on the result of the sentinel
task (or just calling Pool.apply instead of Pool.apply_async in the
first place).

> Another idea that I had is to use map() instead of map_async() and then
> put the producer in its own process. That should work if job creation is
> fast.

Essentially the same thing.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to