22Hello World
33+++++++++++
44
5- This is a series of examples showing the basics of how write :term: ` coroutines
6- <coroutine> ` and
7- schedule them in the asyncio :term: `event loop <event loop> `.
5+ This is a series of examples showing the basics of how to write
6+ :term: ` coroutines <coroutine> ` and schedule them in the asyncio
7+ :term: `event loop <event loop> `.
88
99Simple coroutine
1010----------------
1111
12- Example using the :py:meth: `asyncio.BaseEventLoop.run_until_complete ` method to
13- schedule a
14- simple function that will wait one second, print ' hello' and then finish.
12+ This example uses the :py:meth: `asyncio.BaseEventLoop.run_until_complete `
13+ method to schedule a simple function that will wait one second, print
14+ `` hello `` and then finish.
1515
16- Because it is launched with `run_until_complete `, the :term: ` event loop <event
17- loop> ` itself
16+ Because it is launched with :py:meth: `run_until_complete `,
17+ the :term: ` event loop <event loop> ` itself
1818will terminate once the :term: `coroutine <coroutine> ` is completed.
1919
2020.. literalinclude :: examples/hello_world.py
@@ -23,11 +23,11 @@ will terminate once the :term:`coroutine <coroutine>` is completed.
2323Creating tasks
2424--------------
2525
26- This second example show how you can schedule multiple :term: `coroutines
26+ This second example shows how you can schedule multiple :term: `coroutines
2727<coroutine> ` in the
2828event loop, and then run the :term: `event loop <event loop> `.
2929
30- Notice that this example will print ' second_hello' before ' first_hello' ,
30+ Notice that this example will print `` second_hello `` before `` first_hello `` ,
3131as the first :term: `task <task> ` scheduled waits longer that the second one
3232before printing.
3333
0 commit comments