Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-07-03 | locking: T6544: Added locking util | zsdc | |
Sometimes we need a reliable way to lock an execution until some other operation is not done. This commit introduces locking util, which can be used as a common lock, even between different processes. Usage example: ``` from vyos.utils.locking import Lock lock = Lock('my_lock_id') lock.acquire(timeout=10) print(f'Lock acquired: {lock.is_locked}') lock.release() ``` |