summaryrefslogtreecommitdiff
path: root/Doc/library/asyncio-stream.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-11 16:33:41 -0400
committerYury Selivanov <yselivanov@sprymix.com>2015-05-11 16:33:41 -0400
commitd7e19bb566889343f39c34c98bca4d6db61b53d7 (patch)
treeda2d9f56e2a4962addfce9634606827e39917148 /Doc/library/asyncio-stream.rst
parent71854618973f112b54a620cc565cf0bda8e1508a (diff)
downloadcpython-git-d7e19bb566889343f39c34c98bca4d6db61b53d7.tar.gz
docs/asyncio: Document new ensure_future() and deprecated async()
Diffstat (limited to 'Doc/library/asyncio-stream.rst')
-rw-r--r--Doc/library/asyncio-stream.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index 41b24acaaf..e9638e3628 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()