2 ms·
That's not exactly accurate. When working with sync views FastAPI dumps them into a threadpool. It basically converts them to async on the fly. To quote the doc
by tedivm 5y ago
That's not exactly accurate. When working with sync views FastAPI dumps them into a threadpool. It basically converts them to async on the fly. To quote the docs-
> When you declare a path operation function with normal def instead of async def, it is run in an external threadpool that is then awaited, instead of being called directly (as it would block the server).