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

Skip to content

Commit ed8e3a9

Browse files
committed
asyncio: add missing @coroutine decorator
1 parent ab1c853 commit ed8e3a9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Doc/library/asyncio-stream.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ TCP echo client using the :func:`asyncio.open_connection` function::
250250

251251
import asyncio
252252

253+
@asyncio.coroutine
253254
def tcp_echo_client(message, loop):
254255
reader, writer = yield from asyncio.open_connection('127.0.0.1', 8888,
255256
loop=loop)
@@ -379,6 +380,7 @@ Coroutine waiting until a socket receives data using the
379380
except ImportError:
380381
from asyncio.windows_utils import socketpair
381382

383+
@asyncio.coroutine
382384
def wait_for_data(loop):
383385
# Create a pair of connected sockets
384386
rsock, wsock = socketpair()

0 commit comments

Comments
 (0)