[issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior

2018-05-25 Thread Dmitry Malinovsky
Dmitry Malinovsky added the comment: I've changed the implementation significantly since August 2017, futures are not involved anymore so please ignore that part. However, such drain behavior is still present - but I don't think anymore that yielding to the event loop is an easy

[issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior

2017-08-01 Thread Dmitry Malinovsky
New submission from Dmitry Malinovsky: When there is a huge amount of `writer.write` calls followed by `await writer.drain()` on a non-paused channel, and there are no other coroutine switches, `await writer.drain()` immediately returns without a switch. This is because