[Python-checkins] cpython (3.4): Close #22473: asyncio doc: rephrase Future with run_forever() example

victor.stinner python-checkins at python.org
Tue Dec 2 17:53:15 CET 2014


https://hg.python.org/cpython/rev/a4b58e779a16
changeset:   93702:a4b58e779a16
branch:      3.4
parent:      93700:4e9c495235d9
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Dec 02 17:52:45 2014 +0100
summary:
  Close #22473: asyncio doc: rephrase Future with run_forever() example

files:
  Doc/library/asyncio-task.rst |  11 +++--------
  1 files changed, 3 insertions(+), 8 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
@@ -337,14 +337,9 @@
     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

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


More information about the Python-checkins mailing list