Python Asyncio Pitfalls

Use when debugging asyncio event-loop hangs, blocking calls inside coroutines, asyncio.gather vs TaskGroup choice, cancellation handling, structured concurrency, mixing sync and async, run_in_executor decisions, asyncio task lifetimes, "Task was destroyed but it is pending" warnings, or async context manager bugs. Triggers: event loop blocked by sync I/O, ConnectionResetError on cancellation, asyncio in libraries that also offer sync API, FastAPI/aiohttp performance regressions, queue.Queue used in async code. NOT for trio/anyio (different paradigm), threading without asyncio, or Python 2 sync patterns.

curiositech Updated 10 repo stars

File contents

curiositech/windags-skills/tree/main/skills/python-asyncio-pitfalls commit 064eb8c5a1

Frequently asked questions

npx skillmds@latest add curiositech/python-asyncio-pitfalls