summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-eventloop.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-12-10 01:47:22 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-12-10 01:47:22 (GMT)
commitdbd8950b288cb735ca040e3b9d3a5db0a80f17a4 (patch)
tree89201dbdc66a913067068726c1550f8ddc47bb5f /Doc/library/asyncio-eventloop.rst
parentb69d62dcac1164bb8f848313f0e61ab8eb24bce2 (diff)
downloadcpython-dbd8950b288cb735ca040e3b9d3a5db0a80f17a4.zip
cpython-dbd8950b288cb735ca040e3b9d3a5db0a80f17a4.tar.gz
cpython-dbd8950b288cb735ca040e3b9d3a5db0a80f17a4.tar.bz2
asyncio doc: rewrite the callback hello world to use call_soon() instead of a
direct call.
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-rw-r--r--Doc/library/asyncio-eventloop.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index c5dbb3b..95a8344 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -348,7 +348,7 @@ Print ``Hello World`` every two seconds, using a callback::
loop.call_later(2, print_and_repeat, loop)
loop = asyncio.get_event_loop()
- print_and_repeat(loop)
+ loop.call_soon(print_and_repeat, loop)
loop.run_forever()
.. seealso::