MCPcopy Create free account
hub / github.com/course-dasheng/fe-algorithm / clean

Function clean

interview/limit-promise.js:12–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 promises.push(promise)
11 pool.add(promise)
12 const clean = () => pool.delete(promise)
13 promise.then(clean, clean)
14 if (pool.size >= limit) await Promise.race(pool)
15 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected