summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-dev.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-23 10:41:56 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-02-23 10:41:56 (GMT)
commitb8064a8a16b63a929f94af300624bb239671ad82 (patch)
tree5079b8d72ff56a6690d1dc4c6564e56d3cf6aff8 /Doc/library/asyncio-dev.rst
parent75790938a46784476389d3c7fbe14970f560d7bd (diff)
downloadcpython-b8064a8a16b63a929f94af300624bb239671ad82.zip
cpython-b8064a8a16b63a929f94af300624bb239671ad82.tar.gz
cpython-b8064a8a16b63a929f94af300624bb239671ad82.tar.bz2
asyncio doc: close explicitly event loops
Diffstat (limited to 'Doc/library/asyncio-dev.rst')
-rw-r--r--Doc/library/asyncio-dev.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index bf77a8f..d7f474e 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -212,6 +212,7 @@ Example of unhandled exception::
loop = asyncio.get_event_loop()
asyncio.async(bug())
loop.run_forever()
+ loop.close()
Output::
@@ -258,6 +259,7 @@ coroutine in another coroutine and use classic try/except::
loop = asyncio.get_event_loop()
asyncio.async(handle_exception())
loop.run_forever()
+ loop.close()
Another option is to use the :meth:`BaseEventLoop.run_until_complete`
function::