Commit 705bacc
committed
refactor: consolidate duplicate bounded-concurrency helpers onto mapWithConcurrency (#6602)
src/queue/map-with-concurrency.ts's mapWithConcurrency is the canonical
bounded-concurrency worker-pool helper, but two hand-duplicated copies of the
same loop had drifted in beside it:
- src/signals/focus-manifest-loader.ts's exported mapWithConcurrencyLimit
- src/queue/patchless-secret-scan.ts's private
mapPatchLessSecretScanFilesWithConcurrency
Both now delegate to mapWithConcurrency, keeping their existing names and
(items, limit, mapper) signatures so every caller compiles and behaves
unchanged (processors.ts uses both mapWithConcurrency and
mapWithConcurrencyLimit side by side today). map-with-concurrency.ts is now
the only file under src/queue or src/signals that implements the loop itself.
Pure internal consolidation — no public behavior, signature, or export-name
change. Covered by the existing caller suites (patchless-secret-scan,
focus-manifest-loader/processors); no new test needed.
Closes #66021 parent 3f6591d commit 705bacc
2 files changed
Lines changed: 9 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 165 | + | |
173 | 166 | | |
174 | 167 | | |
175 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
239 | 242 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 243 | + | |
251 | 244 | | |
252 | 245 | | |
253 | 246 | | |
| |||
0 commit comments