replacementFor: (
dead: any,
live: any,
state: any,
) =>
| { pool: any; replace: boolean; slot?: undefined; why: string }
| { pool: any; replace: boolean; slot: any; why?: undefined } = replacementFor
Type Declaration
-
- (
dead: any,
live: any,
state: any,
):
| { pool: any; replace: boolean; slot?: undefined; why: string }
| { pool: any; replace: boolean; slot: any; why?: undefined }
-
Parameters
- dead: any
- live: any
- state: any
Returns
| { pool: any; replace: boolean; slot?: undefined; why: string }
| { pool: any; replace: boolean; slot: any; why?: undefined }
{ replace, pool, slot }, or { replace: false, pool, why }
Decides whether a dead worker is replaced, and in which slot.
Not while stopping, not after the pool gave up, and never past the configured size.