ModelLock
- class ModelLock[T]
Description
Interface for locking model resources.
For example:
Locking all mutex protected documents.
No-op lock to already locked documents.
Members defined in
ModelLock(2 members)Methods
- abstractmethod acquire() list[syside.Document]
Acquire locks to all locked documents. Return a list of documents that the locks give access to.
- abstractmethod release(exc_type: type[BaseException] | None = None, exc_value: BaseException | None = None, traceback: types.TracebackType | None = None) tuple[bool | None, T]
Release all acquired document locks and return a tuple of
(success, unlocked type).Accepts the same arguments as standard
__exit__method where it will typically be called.