MCPcopy
hub / github.com/scrapy/scrapy / worker

Function worker

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

Source from the content-addressed store, hash-verified

110 queue: asyncio.Queue[_T | None] = asyncio.Queue(count * 2)
111
112 async def worker() -> None:
113 while True:
114 item = await queue.get()
115 if item is None:
116 break
117 try:
118 await callable_(item, *args, **kwargs)
119 finally:
120 queue.task_done()
121
122 async def fill_queue() -> None:
123 async for item in as_async_generator(iterable):

Callers 1

_parallel_asyncioFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected