Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 188f2c0

Browse files
committed
asyncio doc: document the new ResourceWarning warnings
1 parent f2e43cb commit 188f2c0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Doc/library/asyncio-dev.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,3 +372,14 @@ traceback where the task was created. Example of log in debug mode::
372372

373373
:ref:`Detect coroutine objects never scheduled <asyncio-coroutine-not-scheduled>`.
374374

375+
376+
Close transports
377+
----------------
378+
379+
When a transport is no more needed, call its ``close()`` method to release
380+
resources.
381+
382+
If a transport (or an event loop) is not closed explicitly, a
383+
:exc:`ResourceWarning` warning will be emitted in its destructor. The
384+
:exc:`ResourceWarning` warnings are hidden by default: use the ``-Wd`` command
385+
line option of Python to show them.

0 commit comments

Comments
 (0)