From: Victor Stinner Date: Fri, 30 Jan 2015 00:35:14 +0000 (+0100) Subject: asyncio doc: document the new ResourceWarning warnings X-Git-Tag: v3.4.3rc1~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=188f2c0b75c69cfbe082f1eca2ed8f8a04fa1718;p=thirdparty%2FPython%2Fcpython.git asyncio doc: document the new ResourceWarning warnings --- diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst index 72a06f538e86..ce1275b4e026 100644 --- a/Doc/library/asyncio-dev.rst +++ b/Doc/library/asyncio-dev.rst @@ -372,3 +372,14 @@ traceback where the task was created. Example of log in debug mode:: :ref:`Detect coroutine objects never scheduled `. + +Close transports +---------------- + +When a transport is no more needed, call its ``close()`` method to release +resources. + +If a transport (or an event loop) is not closed explicitly, a +:exc:`ResourceWarning` warning will be emitted in its destructor. The +:exc:`ResourceWarning` warnings are hidden by default: use the ``-Wd`` command +line option of Python to show them.