@bluelibs/runner - v6.3.1
    Preparing search index...

    Class TaskRunner

    Coordinates task execution for the runtime.

    The task runner owns task admission checks, middleware composition, execution-context tracking, abort-signal propagation, and health-policy enforcement. It also adapts to the runtime lifecycle: before store.lock(), tasks are recomposed on every call because resources may still register interceptors during init(). After the store is locked, the interceptor graph becomes stable, so composed runners are cached per task id for fast repeated execution.

    Index

    Constructors

    • Creates a task runner bound to the shared runtime state.

      Parameters

      • store: Store

        The central runtime registry used to resolve tasks, resources, and lifecycle state.

      • eventManager: EventManager

        The event manager associated with the current runtime.

      • logger: Logger

        The runtime logger instance available to task execution.

      • executionContextStore: ExecutionContextStore = ...

        The execution-context store used to propagate nested task frames and abort signals.

      Returns TaskRunner

    Properties

    eventManager: EventManager

    The event manager associated with the current runtime.

    logger: Logger

    The runtime logger instance available to task execution.

    runnerStore: Map<string | symbol, CachedTaskRunner> = ...
    store: Store

    The central runtime registry used to resolve tasks, resources, and lifecycle state.

    Methods

    • Registers a global interceptor around task execution.

      Interceptors wrap the composed task middleware chain from the outside and may optionally be limited to matching task definitions via options.when. This must be called before store.lock(), while the runtime is still building its middleware graph.

      Parameters

      Returns void