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