summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-task.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-01 02:13:22 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-01 02:13:22 (GMT)
commit04356e1f6f8f3bca6eaf07d7772813e7f2ba8282 (patch)
tree7d6312d8aa83a89e5603a73444af968b5c25fde2 /Doc/library/asyncio-task.rst
parent59a3b6764c504b4816b83be97d05f365f68d7dea (diff)
downloadcpython-04356e1f6f8f3bca6eaf07d7772813e7f2ba8282.zip
cpython-04356e1f6f8f3bca6eaf07d7772813e7f2ba8282.tar.gz
cpython-04356e1f6f8f3bca6eaf07d7772813e7f2ba8282.tar.bz2
Issue #24487: Rename async() -> ensure_future() in asyncio docs.
Patch by Martin Panter.
Diffstat (limited to 'Doc/library/asyncio-task.rst')
-rw-r--r--Doc/library/asyncio-task.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index fa9e96a..166ab73 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -59,7 +59,7 @@ the coroutine object returned by the call doesn't do anything until you
schedule its execution. There are two basic ways to start it running:
call ``await coroutine`` or ``yield from coroutine`` from another coroutine
(assuming the other coroutine is already running!), or schedule its execution
-using the :func:`async` function or the :meth:`BaseEventLoop.create_task`
+using the :func:`ensure_future` function or the :meth:`BaseEventLoop.create_task`
method.
@@ -85,7 +85,7 @@ Coroutines (and tasks) can only run when the event loop is running.
even if they are plain Python functions returning a :class:`Future`.
This is intentional to have a freedom of tweaking the implementation
of these functions in the future. If such a function is needed to be
- used in a callback-style code, wrap its result with :func:`async`.
+ used in a callback-style code, wrap its result with :func:`ensure_future`.
.. _asyncio-hello-world-coroutine:
@@ -394,7 +394,7 @@ Task
<coroutine>` did not complete. It is probably a bug and a warning is
logged: see :ref:`Pending task destroyed <asyncio-pending-task-destroyed>`.
- Don't directly create :class:`Task` instances: use the :func:`async`
+ Don't directly create :class:`Task` instances: use the :func:`ensure_future`
function or the :meth:`BaseEventLoop.create_task` method.
This class is :ref:`not thread safe <asyncio-multithreading>`.