[Python-checkins] cpython: asyncio doc: explain where does the task come from.

victor.stinner python-checkins at python.org
Fri Dec 13 12:52:43 CET 2013


http://hg.python.org/cpython/rev/ad150dd97561
changeset:   87935:ad150dd97561
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Dec 13 12:51:24 2013 +0100
summary:
  asyncio doc: explain where does the task come from.

files:
  Doc/library/asyncio-task.rst |  10 ++++++----
  1 files changed, 6 insertions(+), 4 deletions(-)


diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -108,10 +108,12 @@
 .. 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list