mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
Fix grammar and add markup
This commit is contained in:
parent
3245e79b82
commit
679688e70d
1 changed files with 6 additions and 5 deletions
|
|
@ -4,7 +4,7 @@ Develop with asyncio
|
||||||
====================
|
====================
|
||||||
|
|
||||||
Asynchronous programming is different than classical "sequential" programming.
|
Asynchronous programming is different than classical "sequential" programming.
|
||||||
This page lists common traps and explain how to avoid them.
|
This page lists common traps and explains how to avoid them.
|
||||||
|
|
||||||
|
|
||||||
Handle correctly blocking functions
|
Handle correctly blocking functions
|
||||||
|
|
@ -131,14 +131,15 @@ function::
|
||||||
See also the :meth:`Future.exception` method.
|
See also the :meth:`Future.exception` method.
|
||||||
|
|
||||||
|
|
||||||
Chain correctly coroutines
|
Chain coroutines correctly
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
When a coroutine function calls other coroutine functions and tasks, they
|
When a coroutine function calls other coroutine functions and tasks, they
|
||||||
should chained explicitly with ``yield from``. Otherwise, the execution is no
|
should be chained explicitly with ``yield from``. Otherwise, the execution is
|
||||||
more guaranteed to be sequential.
|
not guaranteed to be sequential.
|
||||||
|
|
||||||
Example with different bugs using sleep to simulate slow operations::
|
Example with different bugs using :func:`asyncio.sleep` to simulate slow
|
||||||
|
operations::
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue