iya-sts
    Preparing search index...

    Variable replacementFor

    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 }
      • 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.

        Parameters

        • dead: any

          the dead worker's entry

        • live: any

          the worker table

        • state: any

          optional overrides { stopped, givenUp, wanted }, for tests

        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 }