Prelude API
    Preparing search index...

    Interface Self<M, S>

    The actor as seen from inside its own handler and hooks.

    Deliberately has no ask, and its lifecycle methods return nothing: the handler is the in-flight work that a stop, kill or restart must wait for, so awaiting termination from inside it could never resolve. Requests take effect once the current handler or hook returns; the actor's own stop/kill/restart remain available to outside callers who need to wait.

    send resolves once the message is enqueued. With a bounded mailbox that is full, do not await it from inside the handler — only the handler itself makes room.

    interface Self<M, S> {
        name?: string;
        pending: number;
        restarts: number;
        state: S;
        status: Status;
        kill(reason?: unknown): void;
        restart(): void;
        send(message: M): Promise<void>;
        stop(): void;
    }

    Type Parameters

    • M
    • S
    Index
    name?: string
    pending: number
    restarts: number
    state: S
    status: Status
    • Parameters

      • Optionalreason: unknown

      Returns void

    • Parameters

      • message: M

      Returns Promise<void>