Skip to content

Commit 9e07a36

Browse files
anordin95webknjazwillingcZeroIntensity
authored
Apply suggestions from code review
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Carol Willing <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
1 parent b2e90f3 commit 9e07a36

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _a-conceptual-overview-of-asyncio:
22

3-
********************************
4-
A Conceptual Overview of asyncio
5-
********************************
3+
***************************************
4+
A Conceptual Overview of :mod:`asyncio`
5+
***************************************
66

77
:Author: Alexander Nordin
88

@@ -35,7 +35,7 @@ Event Loop
3535

3636
Everything in ``asyncio`` happens relative to the event loop.
3737
It's the star of the show.
38-
It's kind of like an orchestra conductor or military general.
38+
It's like an orchestra conductor.
3939
It's behind the scenes managing resources.
4040
Some power is explicitly granted to it, but a lot of its ability to get things
4141
done comes from the respect and cooperation of its subordinates.
@@ -135,7 +135,7 @@ Instead, it provides a generator object::
135135
>>> get_random_number()
136136
<generator object get_random_number at 0x1048671c0>
137137

138-
You can "invoke" or proceed to the next ``yield`` of a generator by using the
138+
You can proceed to the next ``yield`` of a generator by using the
139139
built-in function :func:`next`.
140140
In other words, the generator runs, then pauses.
141141
For example::
@@ -178,14 +178,14 @@ different ways::
178178
await task
179179
await coroutine
180180

181-
Unfortunately, it actually does matter which type of object await is applied to.
181+
Unfortunately, it does matter which type of object is awaited.
182182

183183
``await``\ ing a task will cede control from the current task or coroutine to
184184
the event loop.
185185
And while doing so, adds a callback to the awaited task's list of callbacks
186186
indicating it should resume the current task/coroutine when it (the
187187
``await``\ ed one) finishes.
188-
In other words, when that awaited task finishes, it adds the original task
188+
In other words, when that awaited task finishes, the original task is added
189189
back to the event loops queue.
190190

191191
In practice, it's slightly more convoluted, but not by much.
@@ -322,7 +322,7 @@ ways that control flow and values were passed.
322322

323323
The only way to yield (or effectively cede control) from a coroutine is to
324324
``await`` an object that ``yield``\ s in its ``__await__`` method.
325-
That might sound odd to you. Frankly, it was to me too. You might be thinking:
325+
That might sound odd to you. You might be thinking:
326326

327327
1. What about a ``yield`` directly within the coroutine? The coroutine becomes
328328
an async generator, a different beast entirely.

0 commit comments

Comments
 (0)