Skip to content
Sharp

Concurrency · interview question

A bug appears around async def and await. What is the strongest first debugging move?

Multiple choiceEasychapter-15-curatedpremiumconcurrencyasync-def-and-await
python
import asyncio

async def fetch_order(order_id: str) -> dict[str, str]:
    await asyncio.sleep(0.1)
    return {"order_id": order_id}
Choose one answer
Answer and explanation

Correct answer

D. Trace one concrete example, inspect the state transitions, and compare them to the intended rule before rewriting anything.

Why

That approach is reliable because it creates evidence. Calling everything async without a workload reason creates complexity without guaranteed benefit.

Test yourself on Concurrency

A free test with instant, explained results. No account needed.

Start free test
All Concurrency questions →