[Python-checkins] cpython (3.4): asyncio doc: close explicitly event loops
victor.stinner
python-checkins at python.org
Mon Feb 23 11:42:38 CET 2015
https://hg.python.org/cpython/rev/05bd5ec8365e
changeset: 94733:05bd5ec8365e
branch: 3.4
parent: 94731:5dfdaec85345
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Feb 23 11:41:56 2015 +0100
summary:
asyncio doc: close explicitly event loops
files:
Doc/library/asyncio-dev.rst | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -212,6 +212,7 @@
loop = asyncio.get_event_loop()
asyncio.async(bug())
loop.run_forever()
+ loop.close()
Output::
@@ -258,6 +259,7 @@
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::
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list