File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,9 @@ Synchronous methods (immediate return):
513
513
Asynchronous methods:
514
514
* ` put ` Arg: the object to put on the queue. If the queue is full, it will
515
515
block until space is available.
516
-
516
+ * ` get ` Return an object from the queue. If empty, block until an item is
517
+ available.
518
+
517
519
Retrieving items from the queue:
518
520
519
521
The ` RingbufQueue ` is an asynchronous iterator. Results are retrieved using
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ def __aiter__(self):
64
64
return self
65
65
66
66
async def __anext__ (self ):
67
+ return await self .get ()
68
+
69
+ async def get (self ):
67
70
while self .empty (): # Empty. May be more than one task waiting on ._evput
68
71
await self ._evput .wait ()
69
72
r = self ._q [self ._ri ]
You can’t perform that action at this time.
0 commit comments