MCPcopy
hub / github.com/scrapy/scrapy / fill_queue

Function fill_queue

scrapy/utils/asyncio.py:122–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120 queue.task_done()
121
122 async def fill_queue() -> None:
123 async for item in as_async_generator(iterable):
124 await queue.put(item)
125 for _ in range(count):
126 await queue.put(None)
127
128 fill_task = asyncio.create_task(fill_queue())
129 work_tasks = [asyncio.create_task(worker()) for _ in range(count)]

Callers 1

_parallel_asyncioFunction · 0.85

Calls 1

as_async_generatorFunction · 0.90

Tested by

no test coverage detected