:tocdepth: 3 :py:mod:`gws.lib.lock` ====================== .. py:module:: gws.lib.lock .. autoapi-nested-parse:: Utilities for locking **Source code:** :source:`gws.lib.lock` Package Contents ---------------- .. py:class:: HardFileLock(path: str, retries: int = 10, pause: int = 2) Hard file-based locking. Keep attempting to lock a file until the timeout expires. .. py:attribute:: fp :value: None .. py:attribute:: path .. py:attribute:: pause :value: 2 .. py:attribute:: retries :value: 10 .. py:class:: SoftFileLock(path: str) Soft file-based locking. Attempt to lock a file and yield the success status. .. py:attribute:: fp :value: None .. py:attribute:: path