- withLock<ReturnType, const ScopeType>(scope, key, callback): Promise<ReturnType>
Type Parameters
ReturnType
const ScopeType = any
Parameters
scope: ScopeType
key: string
- withLock<ReturnType, const ScopeType>(scope, key, acquireLockSignal, callback): Promise<ReturnType>
Type Parameters
ReturnType
const ScopeType = any
Parameters
scope: ScopeType
key: string
acquireLockSignal: undefined | AbortSignal
Only allow one instance of the callback to run at a time for a given
scope
andkey
.