Run async I/O with bounded concurrency
Mid · practical lab · 35 min · runtime python
Brief
Implement async fetch_all(urls, limit=5) that fetches with asyncio and an HTTP client, never has more than limit requests in flight, returns results in input order, and cancels the remaining work after the first exception.
3 progressive hints are available in the editor.
Public checks
- caps in-flight work — expected:
uses asyncio.Semaphore(limit) or a worker pool