Skip to content

Commit 27d1dcd

Browse files
committed
Align section-header lengths with section names.
1 parent 0f2b8db commit 27d1dcd

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ In part 1, we'll cover the main, high-level building blocks of asyncio: the
3232
event-loop, coroutine functions, coroutine objects, tasks & ``await``.
3333

3434

35-
==========================
35+
==========
3636
Event Loop
37-
==========================
37+
==========
3838

3939
Everything in asyncio happens relative to the event-loop.
4040
It's the star of the show and there's only one.
@@ -66,9 +66,9 @@ the overall event-loop approach rather useless.
6666
event_loop = asyncio.new_event_loop()
6767
event_loop.run_forever()
6868

69-
====================================
69+
===================================
7070
Asynchronous Functions & Coroutines
71-
====================================
71+
===================================
7272

7373
This is a regular 'ol Python function::
7474

@@ -113,9 +113,9 @@ Notably, the coroutine can be paused & resumed at various points within the
113113
function's body.
114114
That pausing & resuming ability is what allows for asynchronous behavior!
115115

116-
===========
116+
=====
117117
Tasks
118-
===========
118+
=====
119119

120120
Roughly speaking, tasks are coroutines (not coroutine functions) tied to an
121121
event-loop.
@@ -137,9 +137,9 @@ argument optional and will add it for you if it's left unspecified::
137137
# loop argument was left unspecified.
138138
another_special_task = asyncio.Task(coro=special_fella(magic_number=12))
139139

140-
===========
140+
=====
141141
await
142-
===========
142+
=====
143143

144144
``await`` is a Python keyword that's commonly used in one of two different ways::
145145

@@ -220,9 +220,9 @@ This is where the magic happens.
220220
You'll come away from this section knowing what await does behind the scenes
221221
and how to make your own asynchronous operators.
222222

223-
===============================================
223+
==============================================
224224
coroutine.send(), await, yield & StopIteration
225-
===============================================
225+
==============================================
226226

227227
asyncio leverages those 4 components to pass around control.
228228

@@ -302,9 +302,9 @@ That might sound odd to you. Frankly, it was to me too. You might be thinking:
302302
coroutines for the sake of simplicity.
303303
Ideologically, ``yield from`` and ``await`` are quite similar.
304304

305-
===========
305+
=======
306306
Futures
307-
===========
307+
=======
308308

309309
A future is an object meant to represent a computation or process's status and
310310
result.
@@ -329,9 +329,9 @@ Futures are much more versatile and will be marked as done when you say so.
329329
In this way, they're the flexible interface for you to make your own conditions
330330
for waiting and resuming.
331331

332-
==========================
332+
=========================
333333
await-ing Tasks & futures
334-
==========================
334+
=========================
335335

336336
``Future`` defines an important method: ``__await__``. Below is the actual
337337
implementation (well, one line was removed for simplicity's sake) found

0 commit comments

Comments
 (0)