mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
asyncio doc: Fix doc of get and put methods of Queue
This commit is contained in:
parent
10e76b67c9
commit
4f9b773a64
1 changed files with 13 additions and 8 deletions
|
@ -293,7 +293,7 @@ Queue
|
||||||
|
|
||||||
.. method:: full()
|
.. method:: full()
|
||||||
|
|
||||||
Return ``True`` if there are maxsize items in the queue.
|
Return ``True`` if there are :attr:`maxsize` items in the queue.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@ -302,12 +302,15 @@ Queue
|
||||||
|
|
||||||
.. method:: get()
|
.. method:: get()
|
||||||
|
|
||||||
Remove and return an item from the queue.
|
Remove and return an item from the queue. If queue is empty, wait until
|
||||||
|
an item is available.
|
||||||
If you yield from :meth:`get()`, wait until a item is available.
|
|
||||||
|
|
||||||
This method is a :ref:`coroutine <coroutine>`.
|
This method is a :ref:`coroutine <coroutine>`.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
The :meth:`empty` method.
|
||||||
|
|
||||||
.. method:: get_nowait()
|
.. method:: get_nowait()
|
||||||
|
|
||||||
Remove and return an item from the queue.
|
Remove and return an item from the queue.
|
||||||
|
@ -317,13 +320,15 @@ Queue
|
||||||
|
|
||||||
.. method:: put(item)
|
.. method:: put(item)
|
||||||
|
|
||||||
Put an item into the queue.
|
Put an item into the queue. If the queue is full, wait until a free slot
|
||||||
|
is available before adding item.
|
||||||
If you yield from ``put()``, wait until a free slot is available before
|
|
||||||
adding item.
|
|
||||||
|
|
||||||
This method is a :ref:`coroutine <coroutine>`.
|
This method is a :ref:`coroutine <coroutine>`.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
The :meth:`full` method.
|
||||||
|
|
||||||
.. method:: put_nowait(item)
|
.. method:: put_nowait(item)
|
||||||
|
|
||||||
Put an item into the queue without blocking.
|
Put an item into the queue without blocking.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue