Module lock

Source
Expand description

Provides an API over “managed” lock

Structs§

LockManager
A lock manager to create “managed” locks.
LockManagerHandle
Handle to the lock manager background thread.
ManagedLock
A Lock instance with automatic lease refresh and lock revocation when dropped.
ManagedLockGuard
Acquired only via ManagedLock::scope or ManagedLock::scope_with.
ManagedLockRevokeNotify
Used to notify when a lock is revoked.

Enums§

LockError
Error that can occur when using a managed lock.
LockingError
Error that can occur when trying to lock a key.
TryLockError
Error that can occur when trying to lock a key.

Functions§

spawn_lock_manager
Creates a lock manager to create “managed” locks.
spawn_lock_manager_with_lease_factory
Creates a lock manager to create “managed” locks.