summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-protocol.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/asyncio-protocol.rst')
-rw-r--r--Doc/library/asyncio-protocol.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
index f9298b2..23d34d0 100644
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -45,7 +45,7 @@ BaseTransport
Return ``True`` if the transport is closing or is closed.
- .. versionadded:: 3.4.4
+ .. versionadded:: 3.5.1
.. method:: get_extra_info(name, default=None)
@@ -87,7 +87,7 @@ BaseTransport
- ``'subprocess'``: :class:`subprocess.Popen` instance
- .. versionchanged:: 3.4.4
+ .. versionchanged:: 3.5.1
``'ssl_object'`` info was added to SSL sockets.
@@ -458,9 +458,9 @@ buffer size reaches the low-water mark.
Coroutines and protocols
------------------------
-Coroutines can be scheduled in a protocol method using :func:`async`, but there
-is no guarantee made about the execution order. Protocols are not aware of
-coroutines created in protocol methods and so will not wait for them.
+Coroutines can be scheduled in a protocol method using :func:`ensure_future`,
+but there is no guarantee made about the execution order. Protocols are not
+aware of coroutines created in protocol methods and so will not wait for them.
To have a reliable execution order, use :ref:`stream objects <asyncio-streams>` in a
coroutine with ``yield from``. For example, the :meth:`StreamWriter.drain`