Use async def when you await async I/O. Plain def endpoints run in a threadpool, which is safe for blocking libraries. Never put blocking calls inside async def.
Loading…
Use async def when you await async I/O. Plain def endpoints run in a threadpool, which is safe for blocking libraries. Never put blocking calls inside async def.