asyncio, tulip issue 202: Add unit test of pause/resume writing for proactor

socket transport
This commit is contained in:
Victor Stinner 2014-12-11 22:23:19 +01:00
parent 049882e561
commit df75d5b402
2 changed files with 82 additions and 4 deletions

View file

@ -230,10 +230,6 @@ class _ProactorBaseWritePipeTransport(_ProactorBasePipeTransport,
assert self._buffer is None
# Pass a copy, except if it's already immutable.
self._loop_writing(data=bytes(data))
# XXX Should we pause the protocol at this point
# if len(data) > self._high_water? (That would
# require keeping track of the number of bytes passed
# to a send() that hasn't finished yet.)
elif not self._buffer: # WRITING -> BACKED UP
# Make a mutable copy which we can extend.
self._buffer = bytearray(data)