mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
asyncio: Cleanup Future API
See https://github.com/python/asyncio/pull/292 for details.
This commit is contained in:
parent
0013ccedd1
commit
5d7e3b6cd2
6 changed files with 49 additions and 40 deletions
|
@ -319,7 +319,8 @@ class _UnixReadPipeTransport(transports.ReadTransport):
|
|||
self._fileno, 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 __repr__(self):
|
||||
info = [self.__class__.__name__]
|
||||
|
@ -442,7 +443,8 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
|
|||
|
||||
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 __repr__(self):
|
||||
info = [self.__class__.__name__]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue