Skip to content

Commit fee5be7

Browse files
committed
Phrasing tweak.
1 parent 3f6a8f0 commit fee5be7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,11 @@ it'll pause once again and hand control back to the event loop.
594594

595595
Once enough time has elapsed, ``_sleep_watcher(...)`` marks the future as
596596
done and completes by exiting its infinite ``while`` loop.
597-
In the process of marking the future as done, the future's list of callbacks,
598-
namely to resume the ``async_sleep(3)`` coroutine, are added to the event loop.
599-
Some time later, the event loop will resume that coroutine and the program will
600-
proceed in the ``main()`` coroutine.
597+
Marking the future as done adds its list of callbacks, namely to resume the
598+
``async_sleep(3)`` coroutine, to the event loop.
599+
Some time later, the event loop resumes that coroutine.
600+
Since there are no further instructions (the last one was ``await future``),
601+
it too finishes and returns to ``main()`` where the program proceeds.
601602
Given this helper task is only invoked once per cycle of the event loop,
602603
you'd be correct to note that this asynchronous sleep will sleep *at least*
603604
three seconds, rather than exactly three seconds.

0 commit comments

Comments
 (0)