mutexRunExclusive()
function mutexRunExclusive<T>(
mutex,
callback,
options?): Promise<T>
Wrapper for async-mutex runExclusive, which allows for a timeout on each exclusive lock.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
mutex | Mutex |
callback | () => Promise<T> |
options? | { timeoutMs: number; } |
options.timeoutMs? | number |
Returns
Promise<T>