Function lockMutex
Parameters
- name: string
Returns Promise<Mutex>
- lockMutex(
name: string,
options: { __skipNameCheck?: boolean; timeout: WaitPeriod },
): Promise<null | Mutex>Parameters
- name: string
- options: { __skipNameCheck?: boolean; timeout: WaitPeriod }
Returns Promise<null | Mutex>
Parameters
- name: string
- options: { __skipNameCheck?: boolean }
Returns Promise<Mutex>
Lock the requested mutex
Param: name
The name of the mutex to lock
Param: options
timeout optional timeout in milliseconds. If not specified, the mutex will be waited for indefinitely
Returns
A locked mutex, or null if locking failed due to a timeout