diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-12-02 16:52:45 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-12-02 16:52:45 (GMT) |
commit | 039f703b7b6c80bb7ef35f490447529b2747560f (patch) | |
tree | 238ac87594768ef52c344743077b140204032a73 | |
parent | eb2763dd436f0ca1ea8033a56503f6ba6ee8e779 (diff) | |
download | cpython-039f703b7b6c80bb7ef35f490447529b2747560f.zip cpython-039f703b7b6c80bb7ef35f490447529b2747560f.tar.gz cpython-039f703b7b6c80bb7ef35f490447529b2747560f.tar.bz2 |
Close #22473: asyncio doc: rephrase Future with run_forever() example
-rw-r--r-- | 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 index a07db29..0d94cb8 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -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 |