From 7ed20ee7f32ee105c19243c6cf02cf54714c0c45 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Tue, 9 Dec 2025 19:24:40 +0500 Subject: [PATCH] Limit the queue size in _parallel_asyncio(). (#7159) --- scrapy/utils/asyncio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/utils/asyncio.py b/scrapy/utils/asyncio.py index 15e7736ec..25237d0ba 100644 --- a/scrapy/utils/asyncio.py +++ b/scrapy/utils/asyncio.py @@ -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: