[issue8037] multiprocessing.Queue's put() not atomic thread wise

Vilnis Termanis report at bugs.python.org
Tue Mar 2 17:38:47 CET 2010


Vilnis Termanis <vilnis.termanis at googlemail.com> added the comment:

I couldn't see the wood for the trees:
If put() is thread-blocking, multiprocessing.Queue is reduced to the same functionality as multiprocessing.queues.SimpleQueue, if I'm not mistaken. So maybe there should be a warning in the documentation that, for multiprocessing.[Joinable]Queue, modifying obj straight after calling put(obj) might en-queue the modified version.

To me at least this wasn't obvious until I looked at the multiprocessing.queue code.

I've modified the example for clarity and retracted the (unworthy) patch attempt.

Regards,
VT

----------

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


More information about the Python-bugs-list mailing list