[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2019-11-04 Thread Callum Ward
Callum Ward added the comment: Hi, I'm a new contributor: is there any consensus on what or if something needs to be done? If so, I can try and take forward the patch. -- nosy: +callumquick ___ Python tracker

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2019-04-15 Thread Nic Watson
Change by Nic Watson : -- nosy: +jnwatson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-09-09 Thread Aymeric Augustin
Aymeric Augustin added the comment: I worked around this bug in websockets by serializing access to `drain()` with a lock: https://github.com/aaugustin/websockets/commit/198b71537917adb44002573b14cbe23dbd4c21a2 I suspect this is inefficient but it beats crashing. --

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-07-24 Thread Марк Коренберг
Марк Коренберг added the comment: Triggered almost the same error. Minimal proof: Documentation did not say that .drain() can't be called simultaneously. === async def do_nothing(client_reader, client_writer): await asyncio.sleep(1) mb = b'*' * (4096*4)

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-07-10 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-29 Thread Aymeric Augustin
Aymeric Augustin added the comment: drain() returns when the write buffer reaches the low water mark, not when it's empty, so you don't have a guarantee that your bytes were written to the socket.

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-28 Thread Rémi Cardona
Rémi Cardona added the comment: Got hit by this too, many times as I'm working with 3G devices (slow write speeds). As for "drain()", I'd say it should work like a fence/barrier: to let you know that the bytes in the buffer up to when the call was issued have been successfully written on

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-28 Thread Aymeric Augustin
Aymeric Augustin added the comment: For context, websockets calls `yield from self.writer.drain()` after each write in order to provide backpressure. If the output buffer fills up, calling API coroutines that write to the websocket connection becomes slow and hopefully the backpressure will

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-28 Thread STINNER Victor
Changes by STINNER Victor : -- title: asyncio.StreamWriter.drain raises an AssertionError under heavy use -> Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing