Andrey Paramonov added the comment:
Hello!
Below is updated implementation containing more consistent error handling.
The main rough edges encountered:
1. asyncio.Queue alone proved insufficient for precise control of limit, as
asyncio.create_task() schedules created Task() immediately and
Andrey Paramonov added the comment:
> an implicit requirement that back pressure from the consumer should be
> handled (i.e. if whoever's iterating through "async for fut in
> as_completed(...)" is too slow, then the tasks should pause until it catches
> u
Andrey Paramonov added the comment:
Might as_completed() be considered a low-level API, but as of Python 3.7 there
are seemingly no ready alternatives to achieve proposed behavior. All of
asyncio.gather(), asyncio.wait(), asyncio.as_completed() expect awaitables list
of limited size; doing
New submission from Andrey Paramonov :
Currently, memoryview values can be assigned from all bytes-like objects
(https://docs.python.org/3/glossary.html#term-bytes-like-object) except byte
array.array:
import array
mview = memoryview(bytearray(b'hello'))
mview[:] = byt