Irit Katriel added the comment:
It should be possible to do this now through the context, but it's not
documented:
>>> import multiprocessing as mp
>>> ctx = mp.get_context()
>>> ctx.SimpleQueue
>
>>> ctx.SimpleQueue = list
>>> ctx.SimpleQueue
--
nosy: +iritkatriel
Antoine Pitrou pit...@free.fr added the comment:
As the name implies, _setup_queues is a private method. It feels a bit weird to
recommend overriding it in a subclass.
--
nosy: +pitrou
stage: test needed - needs patch
versions: +Python 3.3 -Python 3.2
Ask Solem a...@celeryproject.org added the comment:
@swindmill, if you provide a doc/test patch then this can probably be merged.
@pitrou, We could change it to `setup_queues`, though I don't think
even changing the name of private methods is a good idea. It could simply be
an alias to
Sterling Windmill sterl...@ampx.net added the comment:
I would also like to see this functionality as I'm currently using more memory
than I'd like when using multiprocessing.Pool
--
nosy: +swindmill
___
Python tracker rep...@bugs.python.org
Changes by Petri Lehtinen pe...@digip.org:
--
nosy: +petri.lehtinen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
___
Python-bugs-list
Ask Solem a...@opera.com added the comment:
Matthew, would you be willing to write tests + documentation for this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
Matthew Leon Grinshpun vertesp...@gmail.com added the comment:
I should be able to do this in November. For the moment I'm a bit busy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
Ask Solem a...@opera.com added the comment:
are there really any test/doc changes needed for this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
Changes by Ask Solem a...@opera.com:
--
stage: needs patch - unit test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
___
Changes by Ask Solem a...@opera.com:
--
nosy: +asksol
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
___
Python-bugs-list mailing list
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
stage: - needs patch
versions: +Python 3.2 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
New submission from Matthew Leon Grinshpun vertesp...@gmail.com:
Multiprocessing's Pool class __init__ method is written in a way that
makes it very difficult for a subclass to modify self._taskqueue. There
are very good reasons for wanting to do this - ie, making the taskqueue
block when it
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - jnoller
nosy: +jnoller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
___
Jesse Noller jnol...@gmail.com added the comment:
I'm not against this; new features will only be committed to the 2.7 and
3.1.x branches however.
Something to help speed this up would be an actual patch with docs/tests
for the module made against python trunk. That way I could review and
Matthew Leon Grinshpun vertesp...@gmail.com added the comment:
I have attached a patch. All I did was shift the one line from __init__
to _setup_queues.
That's it.
You could take advantage of the change in the following way:
class BlockingPool(pool.Pool):
def _setup_queues(self):
Jesse Noller jnol...@gmail.com added the comment:
Thanks Matthew - I agree, it's simple. But fixing the code is 1/3 of the
patch. I'll need to add tests/update the ones there as well as modify the
.rst documentation.
--
___
Python tracker
16 matches
Mail list logo