Async functions let FastAPI pause work on one request while waiting for slow tasks (like database calls), and switch to handle other requests. This means the server can do more work at once without needing more threads.
When the async function awaits, FastAPI can switch to handle other requests instead of waiting, improving concurrency.
Because the endpoint awaits sleep, FastAPI can switch between requests, handling them concurrently and reducing total wait time.
Option B is correct: async def with no await is allowed. Option B uses await in a non-async function (error). Option B calls async function without await (wrong). Option B awaits a function without parentheses (syntax error).
Calling a blocking sync function inside an async endpoint blocks the event loop, making the server unable to handle other requests during that time.