Commit 3085534c authored by Yury Selivanov's avatar Yury Selivanov Committed by GitHub

bpo-33649: Add a hello world example to asyncio.rst (GH-9374)

parent 188ebfa4
......@@ -6,6 +6,19 @@
--------------
.. sidebar:: Hello World!
.. code-block:: python
import asyncio
async def main():
print('Hello ...')
await asyncio.sleep(1)
print('... World!')
asyncio.run(main())
asyncio is a library to write **concurrent** code using
**async/await** syntax.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment