[issue8037] multiprocessing.Queue's put() not atomic thread wise
Vilnis Termanis
report at bugs.python.org
Mon Mar 1 23:28:33 CET 2010
Vilnis Termanis <vilnis.termanis at googlemail.com> added the comment:
More notes:
- Reason for non-atmoic behaviour is due to queue _feeder thread sending the object after the put() method has already exited. Hence changing the object straight after put() can result in the modified object being sent instead.
- Reproduced under Win32 and Ubuntu-64 with v2.6.4
- Not tried with v3.* but looking at the ToT code
it might also be affected
- The attached patch makes put() atomic but I am completely unsure about whether this is the correct way to address the problem (if it's seen as one).
Regards,
VT
----------
keywords: +patch
Added file: http://bugs.python.org/file16410/queues.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8037>
_______________________________________
More information about the Python-bugs-list
mailing list