diff options
Diffstat (limited to 'Doc/library/asyncio-stream.rst')
-rw-r--r-- | Doc/library/asyncio-stream.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 41b24ac..e9638e3 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -364,7 +364,7 @@ Simple example querying HTTP headers of the URL passed on the command line:: url = sys.argv[1] loop = asyncio.get_event_loop() - task = asyncio.async(print_http_headers(url)) + task = asyncio.ensure_future(print_http_headers(url)) loop.run_until_complete(task) loop.close() |