(err: Error)
| 333 | } |
| 334 | |
| 335 | private fail(err: Error): void { |
| 336 | if (!this.failed) this.failed = err; |
| 337 | for (const failStart of this.failStarts) failStart(this.failed); |
| 338 | for (const [, waiter] of this.waiters) waiter.reject(this.failed); |
| 339 | this.waiters.clear(); |
| 340 | for (const [, waiter] of this.synthWaiters) waiter.reject(this.failed); |
| 341 | this.synthWaiters.clear(); |
| 342 | // Pending recycles resolve rather than reject: their per-call timeout |
| 343 | // owns rejection, and the recycle caller checks this.failed next round. |
| 344 | for (const [, done] of this.recycleWaiters) done(); |
| 345 | this.recycleWaiters.clear(); |
| 346 | } |
| 347 | |
| 348 | /** Give every worker what the main thread read from the whole project, ahead of any reference it is sent. */ |
| 349 | shareScans(scans: ProjectScans): void { |
no test coverage detected