Skip to content

Commit 4796f85

Browse files
committed
- Add a note about debug=True on asyncio.run to await coro section.
1 parent ef71d25 commit 4796f85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/howto/a-conceptual-overview-of-asyncio.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ This behavior of ``await coroutine`` can trip a lot of people up!
292292
That example highlights how using only ``await coroutine`` could
293293
unintentionally hog control from other tasks and effectively stall the event
294294
loop.
295+
:func:`asyncio.run` can help you detect such occurences with the ``debug=True``
296+
flag.
297+
Among other things, that will log any coroutines which monopolize execution for
298+
100ms or longer.
295299

296300
The design intentionally trades off some conceptual clarity around usage of
297301
``await`` for improved performance.

0 commit comments

Comments
 (0)