New submission from Garrett Moore <garrettmo...@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@python
components: Documentation
messages: 154995
nosy: Garrett.Moore, docs@python
priority: normal
severity: normal
status: open
title: multiprocessing.Queue documentation is lacking important details
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14206>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to