diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-30 01:35:14 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-30 01:35:14 +0100 |
commit | 75dff6ff3f0b9d1e108e45c924de6060f9e812f7 (patch) | |
tree | f750fd66ba721a1dabf046305eec8f379dd85a22 /Doc/library/asyncio-dev.rst | |
parent | fc398671315240e9e7717089c5d968d5c47f840d (diff) | |
download | cpython-75dff6ff3f0b9d1e108e45c924de6060f9e812f7.tar.gz |
asyncio doc: document the new ResourceWarning warnings
Diffstat (limited to 'Doc/library/asyncio-dev.rst')
-rw-r--r-- | Doc/library/asyncio-dev.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst index 72a06f538e..ce1275b4e0 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 <asyncio-coroutine-not-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. |