Prelude API
    Preparing search index...

    Supervises a group of children (actors or nested supervisors), deciding what happens when one of them fails.

    Children stay in place across restarts — their mailboxes and the references others hold remain valid — because Actor.restart re-initialises state without replacing the actor.

    Restart intensity is bounded: more than maxRestarts restarts within window milliseconds makes the supervisor give up. It then escalates to its own supervisor if it has one; otherwise it kills the remaining children and fails with a SupervisorError.

    Implements

    Index
    name?: string
    supervisor?: Supervisor

    Parent consulted when this supervisor gives up. May be assigned after construction.

    • get done(): Promise<void>

      Settles when the supervisor terminates: resolves on stop/kill, rejects when it gave up.

      Returns Promise<void>

    • get error(): unknown

      The error that made the supervisor give up, if any.

      Returns unknown

    • get restarts(): number

      Total number of child restarts performed.

      Returns number

    • Returns Promise<void>

    • Kills every child immediately, then terminates (even if a child's kill() rejects).

      Parameters

      • reason: unknown = ...

      Returns Promise<void>

    • Restarts every child in start order and resets the restart window.

      Returns Promise<void>

    • Stops children one at a time in reverse start order, then terminates. A child whose stop() rejects does not prevent the others from stopping nor the supervisor from terminating.

      Returns Promise<void>