(w: PoolWorker)
| 426 | } |
| 427 | |
| 428 | private retired(w: PoolWorker): void { |
| 429 | const retirement = this.retiring.get(w); |
| 430 | if (!retirement) return; |
| 431 | clearTimeout(retirement.cap); |
| 432 | this.retiring.delete(w); |
| 433 | retirement.settle(); |
| 434 | } |
| 435 | |
| 436 | // A worker died (crash hook, OOM, segfault, exit≠0). Respawn a replacement and |
| 437 | // retry its in-flight job once; a job that keeps crashing workers fails |