New submission from Vilnis Termanis <vilnis.terma...@googlemail.com>:
If an object, which as been put() in the multiprocessing.Queue is changed immediately after the put() call then changed version may be added to the queue which I assume is not the expected behaviour: >>> from multiprocessing import Queue >>> q = Queue() >>> obj = [[i for i in xrange(j * 10, (j * 10) + 10)] for j in xrange(0,10)] >>> q.put(obj); obj[-1][-1] = None >>> obj2 = q.get() >>> print obj2[-1][-1] None Note: This also happens if the queue is called form a child process like in the attached example. ---------- components: Library (Lib) files: queue_example.py messages: 100278 nosy: vilnis.termanis severity: normal status: open title: multiprocessing.Queue's put() not atomic thread wise type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file16409/queue_example.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8037> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com