From dbd8950b288cb735ca040e3b9d3a5db0a80f17a4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 10 Dec 2013 02:47:22 +0100 Subject: [PATCH] asyncio doc: rewrite the callback hello world to use call_soon() instead of a direct call. --- Doc/library/asyncio-eventloop.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index c5dbb3ba25e..95a83440805 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::