summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-12-13 11:51:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-12-13 11:51:24 (GMT)
commit86e139ad655df3650e138276a03a7e2bff706684 (patch)
tree57e38857770c1bc9d03def462a2c39d313499514
parent68bccb49228f34b0644ce7c30f86fd63c1a7f0f5 (diff)
downloadcpython-86e139ad655df3650e138276a03a7e2bff706684.zip
cpython-86e139ad655df3650e138276a03a7e2bff706684.tar.gz
cpython-86e139ad655df3650e138276a03a7e2bff706684.tar.bz2
asyncio doc: explain where does the task come from.
-rw-r--r--Doc/library/asyncio-task.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 8361257..adc344e 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -108,10 +108,12 @@ Sequence diagram of the example:
.. image:: tulip_coro.png
:align: center
-The diagram shows the logical links between the task and the two coroutines, it
-does not describe exactly how things work internally. For example, the sleep
-coroutine creates an internal future which uses
-:meth:`BaseEventLoop.call_later` to wake up the task in 1 second.
+The "Task" is created by the :meth:`BaseEventLoop.run_until_complete` method
+when it gets a coroutine instead of a task.
+
+The diagram shows the control flow, it does not describe exactly how things
+work internally. For example, the sleep coroutine creates an internal future
+which uses :meth:`BaseEventLoop.call_later` to wake up the task in 1 second.
InvalidStateError