MCPcopy Create free account
hub / github.com/Noumena-Network/code / worker

Function worker

src/services/api/filesApi.ts:289–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

287 let currentIndex = 0
288
289 async function worker(): Promise<void> {
290 while (currentIndex < items.length) {
291 const index = currentIndex++
292 const item = items[index]
293 if (item !== undefined) {
294 results[index] = await fn(item, index)
295 }
296 }
297 }
298
299 // Start workers up to the concurrency limit
300 const workers: Promise<void>[] = []

Callers 1

parallelWithLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected