node-json-db
    Preparing search index...

    Function readLockAsync

    • take a read lock that will be released when the function has finished running

      Type Parameters

      • T

      Parameters

      • func: () => Promise<T>
      • timeout: number | null = null

        time in ms to wait to get the lock. Null mean infinite.

      Returns Promise<T>