transferum
    Preparing search index...

    Class AsyncWriteTransfer<T>

    Asynchronous write adapter for AsyncInputFlowInterface.

    Capabilities: isInput, isAsyncPushable

    Mechanics:

    1. The constructor accepts config.flow: AsyncInputFlowInterface
    2. asyncPush(data) — calls await flow.write(data)
    3. destroy() — does nothing (does not own the flow)

    Ordered execution (config.ordered: true):

    • When enabled, flow.write() invocations are executed sequentially in data-arrival order, regardless of their async duration.
    • Uses an internal OrderedExecutor (promise chain).
    • Default: false (unordered, backward-compatible).

    Error handling:

    • If flow.write() throws an exception, onError is called.
    • With onError provided, the exception is suppressed. Without onError — rethrown.
    • When ordered: true, the executor chain catches errors so that a throwing write does not block subsequent writes. The error is still propagated to the asyncPush caller via the awaited executor promise.

    Configuration (AsyncWriteTransferConfig):

    • flow: AsyncInputFlowInterface — target flow with async write()
    • onError?: ErrorHandler — error handler
    • ordered?: boolean — ordered write execution (default: false)
    • maxConcurrency?, bufferSize?, onBufferOverflow? (BackpressureConfig)

    Use cases:

    • Writing data to async storage (IndexedDB, API)
    • Adapting an arbitrary object with async write() to pipeline

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

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