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

    Module data/loaders/active-load-context

    The per-call demand-load context a leaf loader publishes to its L0 proxies.

    The L0 chokepoint (wrapWithCache's getSignal / getProbe accessors) asks the loader, on every chunk read, "which update's abort signal governs this read, and which residency probe records it?". Those accessors take no arguments, so the loader answers from state. That state used to be ONE slot per loader, set on entry and nulled in finally — not reentrant: when two loads overlap on one loader (a foreground pass and a shadow prefetch pass on the same rung), whichever finished first nulled the other's signal (its superseded reads were no longer cancellable) and detached its probe (its remaining misses went unrecorded, so it reported "resident" and the refine stop rule kept streaming).

    Each call now registers its OWN entry and removes exactly that entry when it settles. While calls overlap, the published answers are the conservative merge, because a chunk read cannot say which call issued it:

    • signal: a read is cancelled only once EVERY active call is aborted, so one call's supersession never cancels a read another live call shares. The composite remains live as calls join or leave;
    • probe: a read is recorded into EVERY active call's probe, so no call can report "all resident" for a miss it may have needed. A spurious miss only ends a refinement step early; a missed one stalls nothing but lies.
    ActiveLoadContext
    SignalEntry