pyinterp.geohash.lock.Lock

class pyinterp.geohash.lock.Lock(path: str)[source]

Bases: pyinterp.geohash.lock.AbstractLock

Handle a lock file by opening the file in exclusive mode: if the file already exists, access to this file will fail.

Parameters

path (str) – Path to the lock.

__init__(path: str) None[source]

Methods

Lock.acquire([timeout, delay])

Acquire a lock.

Lock.locked()

Test the existence of the lock.

Lock.release()

Release the lock.

Lock.__reduce__()

Helper for pickle.

Lock._acquire()

Virtual function to implement the locking process.

Attributes