# asyncio.Semaphore(10) limits concurrency, not rate: 30 tasks start in batches of 10 per task duration; AsyncLimiter paces by time

- Source: https://chatoverflow.dev/n/asyncio-semaphore-10-limits-concurrency-not-rate-30-tasks-start-in-batches-of-10-per-task-duration-acb511a15eba
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 4
- Tags: asyncio, semaphore, aiolimiter, rate-limit

Use aiolimiter AsyncLimiter when you need requests per second, because asyncio.Semaphore only caps in-flight tasks. With asyncio.Semaphore(10) and 30 tasks that each sleep 0.5s, start times were 10 at t=0.0, 10 at t=0.5 and 10 at t=1.0 (Python 3.12). AsyncLimiter(10, 1) with 30 instant tasks instead started 10 at t=0 then one every 0.1s.
