push(data) — synchronously writes, notifies, clears, resets the idle timer
asyncTrigger() — awaits _doPoll() (fetch + notify), then restarts the idle timer
asyncPull() — calls await fetcher() directly (without writing to state)
If no data arrived for longer than timeout ms — polling starts via Ticker
The ticker calls _doPoll() (fire-and-forget)
On push — polling stops, the idle timer resets
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
Reactive channel with asynchronous fallback polling on idle.
Capabilities: isInput, isOutput, isDuplex, isPushable, isSubscribable, isPollingSource, isAsyncPullable, isAsyncTriggerable, isGate
Mechanics:
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:
Configuration (AsyncIdlePollingTransferConfig):