Python for AIIntermediate1 November 2026
An async Python endpoint calls a blocking SDK and stalls unrelated requests. What is the appropriate fix?
Pick an answer to see the explanation.
Answer
Run the blocking call in a thread or use an async client
Blocking I/O on the event loop prevents other async work from progressing. An asynchronous client is preferable when available; otherwise the blocking call can be isolated in a worker thread.
Learn more: Explore AI automation with Python →