summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-26 21:03:44 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-12-26 21:03:44 +0100
commitc34834ff50d18d3fe82803089967ca2357d094eb (patch)
treefd164d72cc4b481d77bbf29eb8f19709ce89d254
parent67f7487ca7d9f09a44c38f7e750572f5dbfa0bc4 (diff)
downloadtrollius-c34834ff50d18d3fe82803089967ca2357d094eb.tar.gz
Fix doc of get and put methods of Queue
-rw-r--r--asyncio/queues.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/asyncio/queues.py b/asyncio/queues.py
index 41551a9..8f6c257 100644
--- a/asyncio/queues.py
+++ b/asyncio/queues.py
@@ -111,8 +111,10 @@ class Queue:
def put(self, item):
"""Put an item into the queue.
- If you yield from put(), wait until a free slot is available
- before adding item.
+ Put an item into the queue. If the queue is full, wait until a free
+ slot is available before adding item.
+
+ This method is a coroutine.
"""
self._consume_done_getters()
if self._getters:
@@ -161,7 +163,9 @@ class Queue:
def get(self):
"""Remove and return an item from the queue.
- If you yield from get(), wait until a item is available.
+ If queue is empty, wait until an item is available.
+
+ This method is a coroutine.
"""
self._consume_done_putters()
if self._putters: