Is it possible to limit the number of coroutines running corcurrently in asyncio?
问题 I already wrote my script using asyncio but found that the number of coroutines running simultaneously is too large and it often ends up hanging around. So I would like to limit the number of coroutines concurrently, and once it reaches the limit, I want to wait for any coroutine to be finished before another is executed. My current code is something like the following: loop = asyncio.get_event_loop() p = map(my_func, players) result = loop.run_until_complete(asyncio.gather(*p)) async def my