@@ -162,7 +162,7 @@ clear in a moment when we discuss ``await``.
162162The recommended way to create tasks is via :func: `asyncio.create_task `.
163163Creating a task automatically adds it to the event loop's queue of tasks.
164164
165- Since there's only one event loop (in each thread), ``asyncio `` takes care of
165+ Since there's only one event loop (in each thread), ``asyncio `` takes care of
166166associating the task with the event loop for you. That is, there's no need
167167to specify the event loop.
168168
@@ -341,18 +341,18 @@ Futures
341341=======
342342
343343A :ref: `future <asyncio-future-obj >` is an object meant to represent a
344- computation or process 's status and result.
344+ computation's status and result.
345345The term is a nod to the idea of something still to come or not yet happened,
346346and the object is a way to keep an eye on that something.
347347
348348A future has a few important attributes. One is its state which can be either
349- pending, cancelled or done.
349+ " pending", " cancelled" or " done" .
350350Another is its result which is set when the state transitions to done.
351- To be clear , a future does not represent the actual computation to be done, like
352- a coroutine does, instead it represents the status and result of that computation,
353- kind of like a status- light (red, yellow or green) or indicator.
351+ Unlike a coroutine , a future does not represent the actual computation to be
352+ done; instead it represents the status and result of that computation, kind of
353+ like a status light (red, yellow or green) or indicator.
354354
355- `` Task `` subclasses `` Future ` ` in order to gain these various capabilities.
355+ :class: ` asyncio. Task ` subclasses :class: ` asyncio. Future ` in order to gain these various capabilities.
356356The prior section said tasks store a list of callbacks and it lied to you a bit.
357357It's actually the ``Future `` class that implements this logic which ``Task ``
358358inherits.
0 commit comments