We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69bc2d4 commit 6e8d725Copy full SHA for 6e8d725
v3/docs/EVENTS.md
@@ -513,7 +513,9 @@ Synchronous methods (immediate return):
513
Asynchronous methods:
514
* `put` Arg: the object to put on the queue. If the queue is full, it will
515
block until space is available.
516
-
+ * `get` Return an object from the queue. If empty, block until an item is
517
+ available.
518
+
519
Retrieving items from the queue:
520
521
The `RingbufQueue` is an asynchronous iterator. Results are retrieved using
v3/primitives/ringbuf_queue.py
@@ -64,6 +64,9 @@ def __aiter__(self):
64
return self
65
66
async def __anext__(self):
67
+ return await self.get()
68
69
+ async def get(self):
70
while self.empty(): # Empty. May be more than one task waiting on ._evput
71
await self._evput.wait()
72
r = self._q[self._ri]
0 commit comments