KelDB Locks

class keldb.locking.BasicLockSystem(locks_count: int = 10000)

Bases: LockSystem

Path-based lock manager.

Maintains a pool of asyncio locks keyed by directory/path, allowing independent synchronization of different resources.

class keldb.locking.DummyLock

Bases: Lock

No-op lock implementation.

This lock never blocks and is intended for situations where locking is disabled but a lock-like API is still required.

async acquire() bool

Simulate successful lock acquisition.

Returns:

True, always.

locked() bool

Report lock state.

Returns:

False, since the lock is never actually held.

release() None

No-op release method.

class keldb.locking.DummyLockSystem

Bases: LockSystem

Lock system that provides no-op locks.

Useful when synchronization is unnecessary but code expects a lock provider.

class keldb.locking.LockSystem

Bases: object

Base interface for lock management systems.

class keldb.locking.SingleLockSystem

Bases: LockSystem

Lock system that uses a single shared lock for all paths.

This provides the strongest synchronization but allows only one operation to proceed at a time regardless of directory.