File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,6 +173,8 @@ to specify the event loop.
173173 # This creates a Task object and puts it on the event loop's queue.
174174 task = asyncio.create_task(coro=loudmouth_penguin(magic_number=5))
175175
176+
177+
176178=====
177179await
178180=====
@@ -394,7 +396,7 @@ preventing other tasks from running.
394396::
395397
396398 async def other_work():
397- print("I am worker . Work work.")
399+ print("I like work . Work work.")
398400
399401 async def main():
400402 # Add a few other tasks to the event loop, so there's something
@@ -477,9 +479,9 @@ Here is the full program's output:
477479
478480 $ python custom-async-sleep.py
479481 Beginning asynchronous sleep at time: 14:52:22.
480- I am worker . Work work.
481- I am worker . Work work.
482- I am worker . Work work.
482+ I like work . Work work.
483+ I like work . Work work.
484+ I like work . Work work.
483485 Done asynchronous sleep at time: 14:52:25.
484486
485487 You might feel this implementation of asynchronous sleep was unnecessarily
You can’t perform that action at this time.
0 commit comments