[issue17025] reduce multiprocessing.Queue contention

Antoine Pitrou report at bugs.python.org
Thu Jan 24 17:44:54 CET 2013


Antoine Pitrou added the comment:

> Here's an implementation of the idea posted on python-ideas
> (http://mail.python.org/pipermail/python-ideas/2013-January/018846.html).
> 
> The principle is really simple, we just serialize/unserialize the
> objects before/after holding the locks. This leads to reduced
> contention.

I would like to suggest again my idea of doing it in Connection instead,
with new methods (e.g. locked_send and locked_recv). Especially given
it can be useful in user code to have a thread-safe Connection (I'm in
this situation currently).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17025>
_______________________________________


More information about the Python-bugs-list mailing list