Utilities for locking
Source code: gws.lib.lock
Package Contents
-
class gws.lib.lock.HardFileLock(path: str, retries: int = 10, pause: int = 2)
Hard file-based locking.
Keep attempting to lock a file until the timeout expires.
-
fp = None
-
path
-
pause = 2
-
retries = 10
-
class gws.lib.lock.SoftFileLock(path: str)
Soft file-based locking.
Attempt to lock a file and yield the success status.
-
fp = None
-
path