diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/asyncio-task.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 45e5843..1ca1b4a 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -293,6 +293,10 @@ Sleeping ``sleep()`` always suspends the current task, allowing other tasks to run. + Setting the delay to 0 provides an optimized path to allow other + tasks to run. This can be used by long-running functions to avoid + blocking the event loop for the full duration of the function call. + .. _asyncio_example_sleep: Example of coroutine displaying the current date every second |