Skip to content

Commit 732b303

Browse files
committed
Log execution time in each future result.
1 parent f00007d commit 732b303

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

asyncio_tutorial/part_II_aiohttp_aiofiles/futures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def register_future() -> Future:
1919

2020
def loop_completed(result: str):
2121
"""
22-
Callback to be called when loop is complete.
22+
Callback to be executed when loop is complete.
2323
24-
:param str result: Simple string describing the state of the loop
24+
:param str result: Result of the loop & its execution time.
2525
"""
2626
LOGGER.success(result)

asyncio_tutorial/part_I_asyncio_intro/futures.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ def register_future() -> Future:
1919

2020
def loop_completed(result: str):
2121
"""
22-
Callback function fired when loop is complete.
22+
Callback to be executed when loop is complete.
2323
24-
:param str result: Message describing the state of the loop & its execution time.
24+
:param str result: Result of the loop & its execution time.
2525
"""
2626
LOGGER.success(
27-
f"{result} \
28-
\n--------------------------------------"
27+
f"{result}\n--------------------------------------"
2928
)

0 commit comments

Comments
 (0)