Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 253b664

Browse files
committed
(Merge 3.4) asyncio: sync with Tulip
Backout the "Tulip issue 181: Faster create_connection()" changeset, it was a mistake.
2 parents f80c52b + 799a60c commit 253b664

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/asyncio/proactor_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, loop, sock, protocol, waiter=None,
3838
self._server.attach(self)
3939
self._loop.call_soon(self._protocol.connection_made, self)
4040
if waiter is not None:
41-
waiter.set_result(None)
41+
self._loop.call_soon(waiter._set_result_unless_cancelled, None)
4242

4343
def _set_extra(self, sock):
4444
self._extra['pipe'] = sock

Lib/asyncio/selector_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def __init__(self, loop, sock, protocol, waiter=None,
481481
self._loop.add_reader(self._sock_fd, self._read_ready)
482482
self._loop.call_soon(self._protocol.connection_made, self)
483483
if waiter is not None:
484-
waiter.set_result(None)
484+
self._loop.call_soon(waiter._set_result_unless_cancelled, None)
485485

486486
def pause_reading(self):
487487
if self._closing:

0 commit comments

Comments
 (0)