(w: PoolWorker)
| 396 | } |
| 397 | |
| 398 | private retired(w: PoolWorker): void { |
| 399 | const retirement = this.retiring.get(w); |
| 400 | if (!retirement) return; |
| 401 | clearTimeout(retirement.cap); |
| 402 | this.retiring.delete(w); |
| 403 | retirement.settle(); |
| 404 | } |
| 405 | |
| 406 | // A worker died (crash hook, OOM, segfault, exit≠0). Respawn a replacement and |
| 407 | // retry its in-flight job once; a job that keeps crashing workers fails |