()
| 137 | } |
| 138 | |
| 139 | private settleOne(): void { |
| 140 | if (this.outstanding > 0) this.outstanding--; |
| 141 | if (this.belowWaiters.length === 0) return; |
| 142 | const still: typeof this.belowWaiters = []; |
| 143 | for (const w of this.belowWaiters) { |
| 144 | if (this.outstanding < w.limit) w.resolve(); |
| 145 | else still.push(w); |
| 146 | } |
| 147 | this.belowWaiters = still; |
| 148 | } |
| 149 | |
| 150 | ready(): Promise<void> { |
| 151 | return this.readyPromise; |
no test coverage detected