This is a composite helper command, to help with using redis as a lock provider. This is achieved as a RedisKey key/value pair with timeout. If the lock does not exist (or has expired), then a new RedisKey key is created (with the supplied duration), and
true
is returned to indicate success. If the lock already exists, then no lock is taken, and
false
is returned. The value may be fetched separately, but the meaning is implementation-defined). No change is made if the lock was not successfully taken. In this case, the client should delay and retry.
It is expected that a well-behaved client will also release the lock in a timely fashion via ReleaseLockAsync.