diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-11-17 17:19:41 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-11-17 17:19:41 (GMT) |
commit | 5d7e3b6cd208dffdfe8530664081b62e0c7e3092 (patch) | |
tree | b6c746197f3d33280a3c99261e0f7288611f97cf /Lib/asyncio/selector_events.py | |
parent | 0013ccedd1e9dd829a5966afc71c2363604b011d (diff) | |
download | cpython-5d7e3b6cd208dffdfe8530664081b62e0c7e3092.zip cpython-5d7e3b6cd208dffdfe8530664081b62e0c7e3092.tar.gz cpython-5d7e3b6cd208dffdfe8530664081b62e0c7e3092.tar.bz2 |
asyncio: Cleanup Future API
See https://github.com/python/asyncio/pull/292 for details.
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r-- | Lib/asyncio/selector_events.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index 236f7b3..a05f81c 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -636,7 +636,8 @@ class _SelectorSocketTransport(_SelectorTransport): self._sock_fd, self._read_ready) if waiter is not None: # only wake up the waiter when connection_made() has been called - self._loop.call_soon(waiter._set_result_unless_cancelled, None) + self._loop.call_soon(futures._set_result_unless_cancelled, + waiter, None) def pause_reading(self): if self._closing: @@ -990,7 +991,8 @@ class _SelectorDatagramTransport(_SelectorTransport): self._sock_fd, self._read_ready) if waiter is not None: # only wake up the waiter when connection_made() has been called - self._loop.call_soon(waiter._set_result_unless_cancelled, None) + self._loop.call_soon(futures._set_result_unless_cancelled, + waiter, None) def get_write_buffer_size(self): return sum(len(data) for data, _ in self._buffer) |