Skip to content

Commit 585521e

Browse files
committed
phrasing tweak.
1 parent 5b3b697 commit 585521e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,10 @@ For example, consider this program:
226226
227227
Because there's no reference to the task object created on line 5, it *might*
228228
be garbage collected before the event loop invokes it.
229-
Despite later instructions in the coroutine ``main()`` handing control back to
230-
the event loop so it can invoke other jobs, the task which wraps the ``hello()``
231-
coroutine may never run because it's already gone!
229+
Later instructions in the coroutine ``main()`` hand control back to the event
230+
loop so it can invoke other jobs.
231+
When the event loop eventually tries to run the task, it might fail and
232+
discover the task object has already been garbage collected!
232233
This can also happen even if a coroutine keeps a reference to a task but
233234
completes before that task finishes.
234235
When the coroutine exits, local variables go out of scope and may be subject

0 commit comments

Comments
 (0)