Acquire.ObjectStore._mutex module¶
-
class
Mutex(key=None, timeout=10, lease_time=10, bucket=None)[source]¶ Bases:
objectThis class implements a mutex that sits in the object store. The mutex is associated with a key. A thread holds this mutex if it has successfully written its secret to this key. If not, then another thread must hold the mutex, and we have to wait…
-
lock(timeout=None, lease_time=None)[source]¶ Lock the mutex, blocking until the mutex is held, or until ‘timeout’ seconds have passed. If we time out, then an exception is raised. The lock is held for a maximum of ‘lease_time’ seconds.
-