]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
asyncio doc: explain where does the task come from.
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 13 Dec 2013 11:51:24 +0000 (12:51 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 13 Dec 2013 11:51:24 +0000 (12:51 +0100)
Doc/library/asyncio-task.rst

index 836125740212e95d13a6a611d463c33883116259..adc344e2168c8bf9f2da0417287c7a2ed92adf6c 100644 (file)
@@ -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