Polyman Documentation - v3.1.0
    Preparing search index...

    Runs one function at a time, in the order they asked.

    Index
    locked: boolean = false
    queue: Waiter[] = []
    • Runs fn when the lock is free. A waiter whose signal aborts leaves the queue and rejects; a running fn is not stopped by the lock, it has to watch the signal itself.

      Type Parameters

      • T

      Parameters

      • fn: () => Promise<T>
      • Optionalsignal: AbortSignal

      Returns Promise<T>