Hi, I wrote asyncio.wait(*readlines) in my test program and Python became slow and ate more and more memory. readlines is declared as [proc.stdout.readline(), proc.stderr.readline()].
The problem is that wait() expects a list of futures : asyncio.wait(readlines). Maybe asyncio.wait(futures) should raise an error if futures is not an iterable. asyncio.wait(future) calls set(future) which can enter an unlimited loop (it's the case for StreamReader.readline coroutine at least...) :-( It's not easy to remember when a function expects a list of futures (futures) or futures (*futures). - list: asyncio.as_completed(futures), wait(futures) - multiple: asyncio.gather(*futures) Why is gather() different?? Similar trap: subprocess.Popen(args) expects a list whereas EventLoop.subprocess_exec(*args) expects multiple paramters. EventLoop.subprocess_exec() should maybe also raise an error if the first argument is a iterable (but not bytes or str). Victor
