Python
中等
面试题库
Python
简单
如何用 httpx.AsyncClient 复用连接池,避免每次请求新建连接?
Python
中等
asyncio 任务的取消与超时(asyncio.timeout)应如何正确使用?
Python
中等
anyio 在 FastAPI/Starlette 中扮演什么角色?为什么要用它做兼容层?
Python
困难
如何在一个既有同步框架中逐步引入异步,实现混合架构?
Python
中等
asyncio.gather 与 asyncio.wait 的区别是什么?异常如何处理?
Python
中等
asyncio 中 CPU 密集任务会阻塞事件循环,如何卸载到进程池?
Python
困难
同步 SQLAlchemy 与 async 应用如何共存而不阻塞事件循环?
Python
中等
如何用 asyncio.to_thread 或 run_in_executor 包装同步阻塞代码?
Python
中等
FastAPI 中 async def 与普通 def 路径函数的执行线程有何不同?
Python
简单
为什么不能在 async 函数中直接调用阻塞的 requests?应如何替代?
Python
困难