]> granicus.if.org Git - python/commitdiff
Close #22473: asyncio doc: rephrase Future with run_forever() example
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 2 Dec 2014 16:52:45 +0000 (17:52 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 2 Dec 2014 16:52:45 +0000 (17:52 +0100)
Doc/library/asyncio-task.rst

index a07db2930a7f7d2906b7018761077faa4cc4fc40..0d94cb8bdbafacbd7270638fe81f6466d7ba732c 100644 (file)
@@ -337,14 +337,9 @@ flow::
     finally:
         loop.close()
 
-In this example, the future is responsible to display the result and to stop
-the loop.
-
-.. note::
-   The "slow_operation" coroutine object is only executed when the event loop
-   starts running, so it is possible to add a "done callback" to the future
-   after creating the task scheduling the coroutine object.
-
+In this example, the future is used to link ``slow_operation()`` to
+``got_result()``: when ``slow_operation()`` is done, ``got_result()`` is called
+with the result.
 
 
 Task