summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-dev.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-19 22:15:02 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-19 22:15:02 (GMT)
commit0f3e6bca1b7478027843fe6181f6b12f4c1514ed (patch)
tree0f997927e36175ab273d42bb947d4eee8001fc46 /Doc/library/asyncio-dev.rst
parentff385b89f40cfdfb6ceab41acfa89fa8594318f6 (diff)
downloadcpython-0f3e6bca1b7478027843fe6181f6b12f4c1514ed.zip
cpython-0f3e6bca1b7478027843fe6181f6b12f4c1514ed.tar.gz
cpython-0f3e6bca1b7478027843fe6181f6b12f4c1514ed.tar.bz2
asyncio, Tulip issue #136: Add get/set_debug() methods to BaseEventLoopTests.
Add also a PYTHONASYNCIODEBUG environment variable to debug coroutines since Python startup, to be able to debug coroutines defined directly in the asyncio module.
Diffstat (limited to 'Doc/library/asyncio-dev.rst')
-rw-r--r--Doc/library/asyncio-dev.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index 90bae84..c5f0d1a 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -1,5 +1,7 @@
.. currentmodule:: asyncio
+.. _asyncio-dev:
+
Develop with asyncio
====================
@@ -81,10 +83,10 @@ Detect coroutine objects never scheduled
When a coroutine function is called but not passed to :func:`async` or to the
:class:`Task` constructor, it is not scheduled and it is probably a bug.
-To detect such bug, set :data:`asyncio.tasks._DEBUG` to ``True``. When the
-coroutine object is destroyed by the garbage collector, a log will be emitted
-with the traceback where the coroutine function was called. See the
-:ref:`asyncio logger <asyncio-logger>`.
+To detect such bug, set the environment variable :envvar:`PYTHONASYNCIODEBUG`
+to ``1``. When the coroutine object is destroyed by the garbage collector, a
+log will be emitted with the traceback where the coroutine function was called.
+See the :ref:`asyncio logger <asyncio-logger>`.
The debug flag changes the behaviour of the :func:`coroutine` decorator. The
debug flag value is only used when then coroutine function is defined, not when