transferum
    Preparing search index...

    Class AsyncIdlePollingTransfer<T>

    Reactive channel with asynchronous fallback polling on idle.

    Capabilities: isInput, isOutput, isDuplex, isPushable, isSubscribable, isPollingSource, isAsyncPullable, isAsyncTriggerable, isGate

    Mechanics:

    1. push(data) — synchronously writes, notifies, clears, resets the idle timer
    2. asyncTrigger() — awaits _doPoll() (fetch + notify), then restarts the idle timer
    3. asyncPull() — calls await fetcher() directly (without writing to state)
    4. If no data arrived for longer than timeout ms — polling starts via Ticker
    5. The ticker calls _doPoll() (fire-and-forget)
    6. On push — polling stops, the idle timer resets
    7. The _polling flag prevents overlapping

    Note: push is synchronous (like in the sync version), but the fetcher is asynchronous. Results arrive via sync subscription. asyncTrigger and asyncPull are async methods.

    Error handling:

    • If fetcher() throws an exception, onError is called.
    • With onError provided, the exception is suppressed. Without onError — rethrown from _doPoll.
    • asyncTrigger() awaits _doPoll() — caller can catch rethrown errors via await.
    • When the ticker fires _doPoll() without onError, the rejection is unhandled (visible in logs as unhandled promise rejection). To suppress — provide onError.

    Configuration (AsyncIdlePollingTransferConfig):

    • fetcher: AsyncDataFetcher — async data retrieval function for idle polling
    • timeout: number — idle time (ms) before polling starts
    • interval: number — fetcher polling interval (ms)
    • activated: boolean — initial idle monitoring state
    • initialValue?: T
    • tickerFactory?: TickerFactory
    • onError?: ErrorHandler

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

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