Prompts-MCP 686 skills · ai / design / design-pattern / framework / fundamentals / habit / lang / tech-selection /mcp/sse
lang lang/python/async/index.md medium

lang-python-async-index

Python 异步规范

子项索引

子项 一句话
no-blocking-call skill async 函数内禁用同步阻塞 I/O — 一个阻塞调用拖死整个 event loop
asyncio-pattern skill asyncio 并发模式 — gather / wait / 锁 / 取消 / 超时
sse-streaming skill SSE 生成器模板 — yield + done 终止信号
py-async-taskgroup-timeout skill asyncio.TaskGroup 结构化并发 + asyncio.timeout 取代裸 gather
py-async-cancellation-handling skill CancelledError 正确传播、asyncio.shield 保护、cleanup
py-async-sync-bridge skill asyncio.to_thread / run_in_executor 把同步阻塞代码桥接进事件循环
py-async-async-pitfalls skill 忘记 await、未捕获 task 异常、fire-and-forget 丢引用三类异步常见 bug