CloudSqlite.acquireWriteLock Function

Attempt to acquire the write lock for a container, with retries.

If write lock is held by another user, call busyHandler if supplied. If no busyHandler, or handler returns "stop", throw. Otherwise try again.

acquireWriteLock(user: string, container: CloudSqlite.CloudContainer, busyHandler?: CloudSqlite.WriteLockBusyHandler): Promise<void>

note if write lock is already held, this function does nothing.

Parameter Type Description
user string the name to be displayed to other users in the event they attempt to obtain the lock while it is held by us
container CloudSqlite.CloudContainer the CloudContainer for which the lock is to be acquired
busyHandler CloudSqlite.WriteLockBusyHandler if present, function called when the write lock is currently held by another user.

Returns - Promise<void>

Defined in

Last Updated: 20 June, 2023