pyinterp.geohash.lock.ObjectStorageLock

class pyinterp.geohash.lock.ObjectStorageLock(path: str, file_system: Optional[fsspec.spec.AbstractFileSystem] = None)[source]

Bases: pyinterp.geohash.lock.AbstractLock

Manages a lock on a remote file system. The creation of the lock is done by creating a directory which must be an atomic operation on the remote file system.

Parameters
  • path (str) – Path to the lock.

  • file_system (fsspec.AbstractFileSystem, optional) – File system used.

__init__(path: str, file_system: Optional[fsspec.spec.AbstractFileSystem] = None) None[source]

Methods

ObjectStorageLock.acquire([timeout, delay])

Acquire a lock.

ObjectStorageLock.locked()

Test the existence of the lock.

ObjectStorageLock.release()

Release the lock.

ObjectStorageLock.__reduce__()

Helper for pickle.

ObjectStorageLock._acquire()

Virtual function to implement the locking process.