Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42519

Re: Get multiprocessing.Queue to do priorities

Newsgroups comp.lang.python
Date 2013-04-01 15:35 -0700
References (2 earlier) <28KdnTocUpw2X5jXnZ2dnUVZ_sudnZ2d@pdx.net> <529683651263584828.031438address_is-invalid.invalid@news.arcor.de> <-vKdnex07oQzQpjXnZ2dnUVZ_hZi4p2d@pdx.net> <4a05ff89_1@news.arcor-ip.de> <mailman.5376.1241962506.11746.python-list@python.org>
Subject Re: Get multiprocessing.Queue to do priorities
From madeleine.udell@gmail.com
Message-ID <mailman.24.1364856317.17481.python-list@python.org> (permalink)

Show all headers | View raw


Was this issue ever resolved? What is the current best practice for those wishing to use a priority queue with multiprocessing?

On Sunday, May 10, 2009 6:35:03 AM UTC-7, Jesse Noller wrote:
> On Sat, May 9, 2009 at 6:11 PM, uuid <M8R-gqmgb4@mailinator.com> wrote:
> > The Queue module, apparently, is thread safe, but *not* process safe. If you
> > try to use an ordinary Queue, it appears inaccessible to the worker process.
> > (Which, after all, is quite logical, since methods for moving items between
> > the threads of the same process are quite different from inter-process
> > communication.) It appears that creating a manager that holds a shared queue
> > might be an option
> > (http://stackoverflow.com/questions/342556/python-2-6-multiprocessing-queue-compatible-with-threads).
> 
> Using a manager, or submitting a patch which adds priority queue to
> the multiprocessing.queue module is the correct solution for this.
> 
> You can file an enhancement in the tracker, and assign/add me to it,
> but without a patch it may take me a bit (wicked busy right now).
> 
> jesse

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Get multiprocessing.Queue to do priorities madeleine.udell@gmail.com - 2013-04-01 15:35 -0700

csiph-web