Skip to content

Instantly share code, notes, and snippets.

View OfferLifted's full-sized avatar

OfferLifted OfferLifted

  • Joined May 4, 2024
View GitHub Profile
@OfferLifted
OfferLifted / asyncio_taskgroup_showcase.py
Created May 6, 2024 17:59
Showcase of using asyncio's TaskGroup with nested TaskGroups and handling errors in a centralised place.
import asyncio
trigger_exception_event = asyncio.Event()
async def coro_1():
for _ in range(10):
print("I'm coro 1 from tg 1")
await asyncio.sleep(1)