@@ -32,9 +32,9 @@ In part 1, we'll cover the main, high-level building blocks of asyncio: the
3232event-loop, coroutine functions, coroutine objects, tasks & ``await ``.
3333
3434
35- ==========================  
35+ ========== 
3636Event Loop
37- ==========================  
37+ ========== 
3838
3939Everything in asyncio happens relative to the event-loop.
4040It'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+ =================================== 
7070Asynchronous Functions & Coroutines
71- ====================================  
71+ =================================== 
7272
7373This is a regular 'ol Python function::
7474
@@ -113,9 +113,9 @@ Notably, the coroutine can be paused & resumed at various points within the
113113function's body.
114114That pausing & resuming ability is what allows for asynchronous behavior!
115115
116- ===========  
116+ ===== 
117117Tasks
118- ===========  
118+ ===== 
119119
120120Roughly speaking, tasks are coroutines (not coroutine functions) tied to an
121121event-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+ ===== 
141141await
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.
220220You'll come away from this section knowing what await does behind the scenes
221221and how to make your own asynchronous operators.
222222
223- ===============================================  
223+ ============================================== 
224224coroutine.send(), await, yield & StopIteration
225- ===============================================  
225+ ============================================== 
226226
227227asyncio 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+ ======= 
306306Futures
307- ===========  
307+ ======= 
308308
309309A future is an object meant to represent a computation or process's status and
310310result.
@@ -329,9 +329,9 @@ Futures are much more versatile and will be marked as done when you say so.
329329In this way, they're the flexible interface for you to make your own conditions
330330for waiting and resuming.
331331
332- ==========================  
332+ ========================= 
333333await-ing Tasks & futures
334- ==========================  
334+ ========================= 
335335
336336``Future `` defines an important method: ``__await__ ``. Below is the actual
337337implementation (well, one line was removed for simplicity's sake) found
0 commit comments