()
| 165 | * rather than making it race a fresh `acquireBuildSlot` caller. |
| 166 | */ |
| 167 | export const releaseBuildSlot = (): void => { |
| 168 | activeBuilds = Math.max(0, activeBuilds - 1); |
| 169 | const next = waitQueue.shift(); |
| 170 | if (next) next.grant(); |
| 171 | }; |
| 172 | |
| 173 | /** Test-only: isolate-scoped module state outlives a single test case. */ |
| 174 | export const resetBuildSlotsForTest = (): void => { |
no outgoing calls
no test coverage detected