Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cb522c

Browse files
committed
Issue #11836: document multiprocessing.queues.SimpleQueue
1 parent 23357eb commit 5cb522c

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

Doc/library/multiprocessing.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ primitives like locks.
464464
For passing messages one can use :func:`Pipe` (for a connection between two
465465
processes) or a queue (which allows multiple producers and consumers).
466466

467-
The :class:`Queue` and :class:`JoinableQueue` types are multi-producer,
467+
The :class:`Queue`, :class:`multiprocessing.queues.SimpleQueue` and :class:`JoinableQueue` types are multi-producer,
468468
multi-consumer FIFO queues modelled on the :class:`queue.Queue` class in the
469469
standard library. They differ in that :class:`Queue` lacks the
470470
: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
610610
exits -- see :meth:`join_thread`.
611611

612612

613+
.. class:: multiprocessing.queues.SimpleQueue()
614+
615+
It is a simplified :class:`Queue` type, very close to a locked :class:`Pipe`.
616+
617+
.. method:: empty()
618+
619+
Return ``True`` if the queue is empty, ``False`` otherwise.
620+
621+
.. method:: get()
622+
623+
Remove and return an item from the queue.
624+
625+
.. method:: put(item)
626+
627+
Put *item* into the queue.
628+
629+
613630
.. class:: JoinableQueue([maxsize])
614631

615632
:class:`JoinableQueue`, a :class:`Queue` subclass, is a queue which

0 commit comments

Comments
 (0)