]> granicus.if.org Git - python/commitdiff
asyncio doc: document the new ResourceWarning warnings
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 30 Jan 2015 00:35:14 +0000 (01:35 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 30 Jan 2015 00:35:14 +0000 (01:35 +0100)
Doc/library/asyncio-dev.rst

index 72a06f538e867164880223ec5e777acd1ee53a31..ce1275b4e02618441ef2b9084f41d9415b0a58b7 100644 (file)
@@ -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.