processLock
import { processLock } from "https://esm.sh/@supabase/supabase-js@2.89.0/dist/index.d.mts";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]