Skip to content

Commit b3538a0

Browse files
committed
Register future prior to creating task list in part I.
1 parent 5b85dc9 commit b3538a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

asyncio_tutorial/part_I_asyncio_intro/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ async def asyncio_intro_tutorial(start_time: float):
1717
:param float start_time: Counter representing the time the script was initialized.
1818
"""
1919
LOGGER.info(f"Asyncio tutorial Part I: Intro to Asyncio.")
20-
task_list = []
2120
future = register_future()
21+
task_list = []
2222
for i in range(3):
2323
task = await create_task(simple_coroutine(i, delay=1))
2424
task_list.append(task)

0 commit comments

Comments
 (0)