Skip to content

Commit 1bc04b4

Browse files
committed
Address reviewer feedback
1 parent 80ff7a1 commit 1bc04b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ model of how :mod:`asyncio` fundamentally works, helping you understand the
99
how and why behind the recommended patterns.
1010

1111
You might be curious about some key :mod:`!asyncio` concepts.
12-
By the end of this article, you'll be able to answer these questions:
12+
By the end of this article, you'll be able to comfortably answer these questions:
1313

1414
- What's happening behind the scenes when an object is awaited?
1515
- How does :mod:`!asyncio` differentiate between a task which doesn't need
@@ -347,7 +347,7 @@ The design intentionally trades off some conceptual clarity around usage of
347347
``await`` for improved performance.
348348
Each time a task is awaited, control needs to be passed all the way up the
349349
call stack to the event loop.
350-
That might sound minor, but in a large program with many ``await`` statements and a deep
350+
That might sound minor, but in a large program with many ``await``s and a deep
351351
call stack, that overhead can add up to a meaningful performance drag.
352352
353353
------------------------------------------------
@@ -489,8 +489,8 @@ We'll go through an example of how you could leverage a future to create your
489489
own variant of asynchronous sleep (``async_sleep``) which mimics
490490
:func:`asyncio.sleep`.
491491

492-
This snippet registers a few tasks with the event loop and then awaits the ``async_sleep(3)``
493-
coroutine, which is wrapped in a task using ``asyncio.create_task``.
492+
This snippet registers a few tasks with the event loop and then awaits the task
493+
created by ``asyncio.create_task``, which wraps the ``async_sleep(3)`` coroutine.
494494
We want that task to finish only after three seconds have elapsed, but without
495495
preventing other tasks from running.
496496

@@ -539,7 +539,7 @@ will monitor how much time has elapsed and, accordingly, call
539539
# Block until the future is marked as done.
540540
await future
541541

542-
Below, we use a simple ``YieldToEventLoop()`` object to ``yield``
542+
Below, we use a rather bare ``YieldToEventLoop()`` object to ``yield``
543543
from its ``__await__`` method, ceding control to the event loop.
544544
This is effectively the same as calling ``asyncio.sleep(0)``, but this approach
545545
offers more clarity, not to mention it's somewhat cheating to use

0 commit comments

Comments
 (0)