(err: Error)
| 296 | } |
| 297 | |
| 298 | private fail(err: Error): void { |
| 299 | if (!this.failed) this.failed = err; |
| 300 | for (const failStart of this.failStarts) failStart(this.failed); |
| 301 | for (const [, waiter] of this.waiters) waiter.reject(this.failed); |
| 302 | this.waiters.clear(); |
| 303 | for (const [, waiter] of this.synthWaiters) waiter.reject(this.failed); |
| 304 | this.synthWaiters.clear(); |
| 305 | // Pending recycles resolve rather than reject: their per-call timeout |
| 306 | // owns rejection, and the recycle caller checks this.failed next round. |
| 307 | for (const [, done] of this.recycleWaiters) done(); |
| 308 | this.recycleWaiters.clear(); |
| 309 | } |
| 310 | |
| 311 | /** Give every worker what the main thread read from the whole project, ahead of any reference it is sent. */ |
| 312 | shareScans(scans: ProjectScans): void { |
no test coverage detected