-
Can I limit multiple coroutines at the same time? async def worker():
async with limiter:
await do_something()
async def main():
workers = [asyncio.create_task(worker()) for _ in range(10)]
asyncio.wait(workers)
asyncio.run(main()) |
Beta Was this translation helpful? Give feedback.
Answered by
mjpieters
Mar 13, 2023
Replies: 1 comment
-
Yes, you can safely use a limiter in multiple co-routines; they'll be rate limited together. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
perklet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can safely use a limiter in multiple co-routines; they'll be rate limited together.