Acquire a lock that stays held until release() (or releaseAll()) is called. Re-entrant: acquiring a name already held by this MultiNodeMutex is a no-op.
OptionaltimeoutMs?: numberthrow if the lock isn't acquired within this many milliseconds. Defaults to DEFAULT_TIMEOUT_MS if not given.
Release a lock acquired with acquire(). No-op if not held.
Release every lock still held. Call in a finally block around a run's execution so an error, finish, or pause never leaves a lock - and its dedicated connection - stuck open. One lock failing to release doesn't stop the rest from being attempted; any failures are thrown together once all locks have been tried.
Run fn() while holding an exclusive lock named name, released as soon
as fn() returns or throws.
lock name; shared names are mutually exclusive across nodes
critical section to run while the lock is held
OptionaltimeoutMs?: numbersee acquire()
A named lock that stays held until you release it, e.g. one workflow run holding a lock across several steps. For a single critical section, use the withLock() helper below instead.