@ac-essentials/misc-util
    Preparing search index...

    Function serializeQueueNext

    • Wraps an asynchronous function to ensure that only one instance runs at a time, and if called again while running, only one additional call is queued to run immediately after the current one completes.

      This pattern serializes async operations and queues at most one next call. If multiple calls are made while an operation is in progress, they all share the same promise for the next execution.

      Useful for preventing overlapping async operations (such as network or file requests) while ensuring that the latest requested operation is not lost.

      This is a specialized form of serialization with a single-call queue, zero wait time, and no arguments.

      Type Parameters

      • T

      Parameters

      Returns AsyncCallable<[signal?: AbortSignal | null], T>

      The wrapped function.