diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-25 11:05:20 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-25 11:05:20 (GMT) |
commit | 18a28dc5c28ae9a953f537486780159ddb768702 (patch) | |
tree | e169539abf96f9e2b1e90efbf0fe960031a69d63 /Lib/asyncio/proactor_events.py | |
parent | 1a901cc952a59cbc5dded92ffd7df43efb62a7e4 (diff) | |
download | cpython-18a28dc5c28ae9a953f537486780159ddb768702.zip cpython-18a28dc5c28ae9a953f537486780159ddb768702.tar.gz cpython-18a28dc5c28ae9a953f537486780159ddb768702.tar.bz2 |
asyncio: sync with Tulip
* Fix _WaitHandleFuture.cancel(): return the result of the parent cancel()
method.
* _OverlappedFuture.cancel() now clears its reference to the overlapped object.
Make also the _OverlappedFuture.ov attribute private.
* Check if _WaitHandleFuture completed before unregistering it in the callback.
Add also _WaitHandleFuture._poll() and repr(_WaitHandleFuture).
* _WaitHandleFuture now unregisters its wait handler if WaitForSingleObject()
raises an exception.
* _OverlappedFuture.set_exception() now cancels the overlapped operation.
Diffstat (limited to 'Lib/asyncio/proactor_events.py')
-rw-r--r-- | Lib/asyncio/proactor_events.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index c530687..ab566b3 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -44,13 +44,9 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin, def __repr__(self): info = [self.__class__.__name__, 'fd=%s' % self._sock.fileno()] if self._read_fut is not None: - ov = "pending" if self._read_fut.ov.pending else "completed" - info.append('read=%s' % ov) + info.append('read=%s' % self._read_fut) if self._write_fut is not None: - if self._write_fut.ov.pending: - info.append("write=pending=%s" % self._pending_write) - else: - info.append("write=completed") + info.append("write=%r" % self._write_fut) if self._buffer: bufsize = len(self._buffer) info.append('write_bufsize=%s' % bufsize) |