- mutex<This, Args, Return>(fn, context?): ((this, ...args) => Promise<Return>)
Type Parameters
- This
- Args extends any[]
- Return
Parameters
- fn: ((this, ...args) => Promise<Return>)
Optional
context: ClassMethodDecoratorContext<This, ((this, ...args) => Promise<Return>)>
Returns ((this, ...args) => Promise<Return>)
Executes only one instance of give code at a time. For parallel calls, it returns the result of the ongoing execution.