[docs] [issue14206] multiprocessing.Queue documentation is lacking important details
report at bugs.python.org
Tue Mar 6 01:32:42 CET 2012
New submission from Garrett Moore <garrettmoore at gmail.com>:
1) If cancel_join_thread() is called, data may be lost. This is not explicitly stated. I had multiple writers put() data in a Queue, and wanted to have the workers finish before I began consuming the data. This caused a deadlock because my Queue was not empty, and it seemed like the a way to force my workers finish was to use cancel_join_thread(). This caused data loss.
2) multiprocessing.Queue states "The Queue class is a near clone of Queue.Queue."
Queue.Queue states "If maxsize is less than or equal to zero, the queue size is infinite."
mp.Queue provides no information on queue size. It is reasonable to assume then that it inherits the property of Queue.Queue.
After discussion on IRC, it seems that mp.Queue maximum size is implementation-dependent and likely relies on how much data Pipes can hold on your platform. If this is the case there should be some mention of the fact that mp.Queue does NOT function like Queue.Queue does for maximum size.
assignee: docs at python
nosy: Garrett.Moore, docs at python
title: multiprocessing.Queue documentation is lacking important details
versions: Python 2.6, Python 2.7
Python tracker <report at bugs.python.org>
More information about the docs