mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
Issue #11836: document multiprocessing.queues.SimpleQueue
This commit is contained in:
parent
23357eb4d6
commit
5cb522cb32
1 changed files with 18 additions and 1 deletions
|
|
@ -464,7 +464,7 @@ primitives like locks.
|
||||||
For passing messages one can use :func:`Pipe` (for a connection between two
|
For passing messages one can use :func:`Pipe` (for a connection between two
|
||||||
processes) or a queue (which allows multiple producers and consumers).
|
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
|
multi-consumer FIFO queues modelled on the :class:`queue.Queue` class in the
|
||||||
standard library. They differ in that :class:`Queue` lacks the
|
standard library. They differ in that :class:`Queue` lacks the
|
||||||
:meth:`~queue.Queue.task_done` and :meth:`~queue.Queue.join` methods introduced
|
:meth:`~queue.Queue.task_done` and :meth:`~queue.Queue.join` methods introduced
|
||||||
|
|
@ -610,6 +610,23 @@ For an example of the usage of queues for interprocess communication see
|
||||||
exits -- see :meth:`join_thread`.
|
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([maxsize])
|
||||||
|
|
||||||
:class:`JoinableQueue`, a :class:`Queue` subclass, is a queue which
|
:class:`JoinableQueue`, a :class:`Queue` subclass, is a queue which
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue