processLock
Implements a global exclusive lock that works only in the current process. Useful for environments like React Native or other non-browser single-process (i.e. no concept of "tabs") environments.
Use {@link #navigatorLock} in browser environments.
@example
await processLock('migrate', 5000, async () => {
await runMigration()
})
function processLock<R>(
name: string,
acquireTimeout: number,
fn: () => Promise<R>,
): Promise<R>;§
processLock<R>(name: string, acquireTimeout: number, fn: () => Promise<R>): Promise<R>
[src]