New submission from Georgy:
adding to asyncio.Queue class following methods:
def __aiter__(self): return self
async def __anext__(self): return await self.get()
let use asyncio.Queue follow:
queue = asyncio.Queue()
...
async for item in queue: do_something_with(item)
----------
components: asyncio
messages: 281536
nosy: RekGRpth, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: asinc iter queue
type: enhancement
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28777>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com