transferum
    Preparing search index...

    Class ThrottleTransfer<T>

    Reactive channel with throttled emission to subscribers on push().

    Capabilities: isInput, isOutput, isPushable, isSubscribable

    Mechanics:

    1. push(data) — if the throttle window is closed (active timer exists): the value is saved as pending but not emitted
    2. If the window is open (no active timer) — the value is emitted immediately (leading edge), a timer for interval ms is started
    3. On interval expiry — if there is a pending value, it is emitted (trailing edge) and a new window is started
    4. subscribe(handler) — subscribes to notifications
    5. destroy() — clears the timer, unsubscribes subscribers, clears state

    Leading + trailing: the first push passes immediately, the last one in the window — after the interval ends. This guarantees that no value is lost and the emission rate is limited to interval.

    Configuration (ThrottleTransferConfig):

    • interval: number — minimum interval between emissions (ms)

    Use cases:

    • Rate-limiting high-frequency events (mouse move, resize)
    • Throttling sensor/tracking data to a fixed FPS
    • Replacing setInterval pattern for periodic updates

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

    Index
    _state: ProxyReference<T>
    isAsyncPollingProxy: boolean = false
    isAsyncPullable: boolean = false
    isAsyncPushable: boolean = false
    isAsyncTriggerable: boolean = false
    isDuplex: true
    isGate: boolean = false
    isInput: true
    isOutput: true
    isPollingProxy: boolean = false
    isPollingSource: boolean = false
    isPullable: boolean = false
    isPushable: true
    isSubscribable: true
    isTriggerable: boolean = false