summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSandro Tosi <sandro.tosi@gmail.com>2012-02-15 22:27:00 (GMT)
committerSandro Tosi <sandro.tosi@gmail.com>2012-02-15 22:27:00 (GMT)
commitcd77815e4ca1339422763b2ec47351d545409287 (patch)
tree59c06b3c73574807624b086e368343aa82bfe48b /Doc
parent91a874196096c9842144804861a4b1593d730315 (diff)
parent5cb522cb32541c5c98df5d4571fef0ecf988cbaa (diff)
downloadcpython-cd77815e4ca1339422763b2ec47351d545409287.zip
cpython-cd77815e4ca1339422763b2ec47351d545409287.tar.gz
cpython-cd77815e4ca1339422763b2ec47351d545409287.tar.bz2
Issue #11836: document and expose multiprocessing.SimpleQueue
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/multiprocessing.rst19
1 files changed, 18 insertions, 1 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 106ccd7..5019eff 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -483,7 +483,7 @@ primitives like locks.
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:`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
@@ -629,6 +629,23 @@ For an example of the usage of queues for interprocess communication see
exits -- see :meth:`join_thread`.
+.. class:: 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