()
| 115 | let cursor = 0; |
| 116 | |
| 117 | async function worker() { |
| 118 | while (true) { |
| 119 | const index = cursor++; |
| 120 | if (index >= urls.length) return; |
| 121 | results[index] = await checkUrl(urls[index]); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | await Promise.all(Array.from({ length: CONCURRENCY }, worker)); |
| 126 |
no test coverage detected