Limit the queue size in _parallel_asyncio(). (#7159)

This commit is contained in:
Andrey Rakhmatullin 2025-12-09 19:24:40 +05:00 committed by GitHub
parent 483e059d59
commit 7ed20ee7f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ async def _parallel_asyncio(
assumes that neither *callable* nor iterating *iterable* will raise an
exception.
"""
queue: asyncio.Queue[_T | None] = asyncio.Queue()
queue: asyncio.Queue[_T | None] = asyncio.Queue(count * 2)
async def worker() -> None:
while True: