|
|
|
|
|
by antirez
4414 days ago
|
|
The proposed algorithm provides a safety guarantee which is time bound: once the lock is acquired it has a specified validity time, after this time, it is possible for another client to reacquire it. In practical terms this forces you to have the protected code path to be "real time", which is, guaranteed to terminate (or to abort) without the specified time. |
|
You could keep re-acquiring the lock when it gets close to expiring, and stop your process if the lock becomes un-acquirable.