# WARNING:  (tracemalloc) ... asyncio: Task was destroyed but it is pending!
Blocking call detected in async def route, event loop stalled for 5.2s

- **ID:** `python/fastapi-async-route-blocking-event-loop`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An `async def` route calls a synchronous/blocking function (requests, time.sleep, heavy CPU) directly, freezing the event loop.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.100.x | active | — | — |
| 0.110.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Use httpx.AsyncClient: `async with httpx.AsyncClient() as c: r = await c.get(url)`
   ```
2. **** (90% success)
   ```
   Offload with `await asyncio.to_thread(blocking_fn, args)` or `run_in_executor`.
   ```

## Dead Ends

- **** — Each worker still blocks its own loop under load. (80% fail)
- **** — Does not yield for blocking I/O; loop still stalls. (90% fail)
