AsyncMutex
Class: AsyncMutex
Defined in: packages/sql/src/relational/transaction.ts:31
FIFO lock: each run starts once the previous one settled, whether it resolved or rejected
Constructors
Constructor
new AsyncMutex():
AsyncMutex
Returns
AsyncMutex
Methods
run()
run<
R>(fn):Promise<R>
Defined in: packages/sql/src/relational/transaction.ts:42
Run operation
Type Parameters
R
R
Parameters
fn
() => Promise<R>
the exclusive section
Returns
Promise<R>
the function result