Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...

    Module workers/worker-pool/selection/dispatch-tracker

    Real in-flight accounting for worker dispatches — instrumentation only.

    activeQueries (see least-busy.ts) holds a slot until the worker's timeout-guarded promise settles, even if the caller has already aborted. This tracker counts from dispatch until the worker's own task promise settles, per worker, alongside (not replacing) activeQueries. It never influences selection; it only feeds the perf counters:

    • worker.dispatches — every task sent to a worker.
    • worker.busyMs — summed dispatch→worker-settle time of every task.
    • worker.misroutes — a dispatch to a worker that already has a real in-flight task while at least one OTHER live worker has none (the task will queue behind unfinished work although an idle worker existed).
    DispatchTracker