[Python-checkins] cpython (2.7): Issue #11836: document multiprocessing.queues.SimpleQueue

sandro.tosi python-checkins at python.org
Wed Feb 15 23:32:01 CET 2012


http://hg.python.org/cpython/rev/3b127a415643
changeset:   74968:3b127a415643
branch:      2.7
parent:      74965:111dcae41ff7
user:        Sandro Tosi <sandro.tosi at gmail.com>
date:        Wed Feb 15 22:39:52 2012 +0100
summary:
  Issue #11836: document multiprocessing.queues.SimpleQueue

files:
  Doc/library/multiprocessing.rst |  19 ++++++++++++++++++-
  1 files changed, 18 insertions(+), 1 deletions(-)


diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -464,7 +464,7 @@
 For passing messages one can use :func:`Pipe` (for a connection between two
 processes) or a queue (which allows multiple producers and consumers).
 
-The :class:`Queue` and :class:`JoinableQueue` types are multi-producer,
+The :class:`Queue`, :class:`multiprocessing.queues.SimpleQueue` and :class:`JoinableQueue` types are multi-producer,
 multi-consumer FIFO queues modelled on the :class:`Queue.Queue` class in the
 standard library.  They differ in that :class:`Queue` lacks the
 :meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join` methods introduced
@@ -610,6 +610,23 @@
       exits -- see :meth:`join_thread`.
 
 
+.. class:: multiprocessing.queues.SimpleQueue()
+
+   It is a simplified :class:`Queue` type, very close to a locked :class:`Pipe`.
+
+   .. method:: empty()
+
+      Return ``True`` if the queue is empty, ``False`` otherwise.
+
+   .. method:: get()
+
+      Remove and return an item from the queue.
+
+   .. method:: put(item)
+
+      Put *item* into the queue.
+
+
 .. class:: JoinableQueue([maxsize])
 
    :class:`JoinableQueue`, a :class:`Queue` subclass, is a queue which

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list