Interface for a lock that expires after a certain period of inactivity. Activity can be signaled by calling renew, which resets the expiration timeout. When the lock has expired, an expired event is emitted and the lock is released.
renew
expired
Release this lock.
A promise resolving when the release is finished.
Reset the lock expiration timeout.
Interface for a lock that expires after a certain period of inactivity. Activity can be signaled by calling
renew
, which resets the expiration timeout. When the lock has expired, anexpired
event is emitted and the lock is released.