Created
November 15, 2022 19:17
-
-
Save YiLi225/7a502d55e685e1c033594e86721b865f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## With asyncio.TaskGroup | |
async def run_errands(): | |
async with asyncio.TaskGroup() as tg: | |
for errand, (start_time, time_to_finish) in errandsDict.items(): | |
tg.create_task(errands_log(errand, | |
start_time, | |
time_to_finish)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment