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

    Function withFetchGate

    • p-limit-style gate: never lets more than the lane's width run concurrently.

      Type Parameters

      • T

      Parameters

      • fn: () => Promise<T>

        The request; its lease is held until the returned promise settles.

      • lane: FetchLane = 'data'

        Data or metadata pool.

      • priority: FetchPriority | FetchPriorityCell = 'demand'

        Urgency class, or a FetchPriorityCell whose class may be raised while the request waits. Defaults to demand.

      • Optionalorigin: string

        The request's origin, which picks the data-lane width (multiplexed origins get the wide lane). Omitted = the default width.

      • Optionalsignal: AbortSignal

        The caller's abort signal: aborting while the request still waits for a slot rejects it with the signal's reason and frees its queue place. Once started, fn owns the signal.

      Returns Promise<T>