summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-dev.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-07-26 09:18:21 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-07-26 09:18:21 (GMT)
commit1050d2d0c7730c6c533246bb2404937739a7775c (patch)
tree68d901cd196aead4df7c3b074ebf2df6e85678e7 /Doc/library/asyncio-dev.rst
parent87ec85f4208bf329e6454fd3e2639c613b2b61af (diff)
downloadcpython-1050d2d0c7730c6c533246bb2404937739a7775c.zip
cpython-1050d2d0c7730c6c533246bb2404937739a7775c.tar.gz
cpython-1050d2d0c7730c6c533246bb2404937739a7775c.tar.bz2
Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.
Patch by Julien Palard.
Diffstat (limited to 'Doc/library/asyncio-dev.rst')
-rw-r--r--Doc/library/asyncio-dev.rst16
1 files changed, 12 insertions, 4 deletions
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index 156c5c0..b9557af 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -321,14 +321,18 @@ operations::
print("Pending tasks at exit: %s" % asyncio.Task.all_tasks(loop))
loop.close()
-Expected output::
+Expected output:
+
+.. code-block:: none
(1) create file
(2) write into file
(3) close file
Pending tasks at exit: set()
-Actual output::
+Actual output:
+
+.. code-block:: none
(3) close file
(2) write into file
@@ -369,13 +373,17 @@ Pending task destroyed
If a pending task is destroyed, the execution of its wrapped :ref:`coroutine
<coroutine>` did not complete. It is probably a bug and so a warning is logged.
-Example of log::
+Example of log:
+
+.. code-block:: none
Task was destroyed but it is pending!
task: <Task pending coro=<kill_me() done, defined at test.py:5> wait_for=<Future pending cb=[Task._wakeup()]>>
:ref:`Enable the debug mode of asyncio <asyncio-debug-mode>` to get the
-traceback where the task was created. Example of log in debug mode::
+traceback where the task was created. Example of log in debug mode:
+
+.. code-block:: none
Task was destroyed but it is pending!
source_traceback: Object created at (most recent call last):