Function lockBindingsAndDo

Locks the specified bindings until the functions result is resolved or rejected

  • Type Parameters

    • T

    Parameters

    • bindings: (undefined | ReadonlyBinding<any>)[]

      The bindings to be locked

    • func: () => T | Promise<T>

      The function to run while the bindings are locked

    Returns T | Promise<T>

    The result of the specified function