title: Acquiring Locks when updating a Redis key/value
body: <p>I'm using AcquireLock method from ServiceStack Redis when updating and getting the key/value like this:</p>
  
  <pre><code>public virtual void Set(string key, T entity)
  {
      using (var client = ClientManager.GetClient())
      {
          using (client.AcquireLock(key + ":locked", DefaultLockingTimeout, DefaultLockExpire))
          {
              client.Set(key, entity);
          }
      }
  }
  </code></pre>
  
  <p>I've extended AcqurieLock method to accept extra parameter for expiration of the lock key. So I'm wondering that if I need AcquireLock at all or not? My class uses AcquireLock in every operation like Get&lt;>, GetAll&lt;>, ExpireAt, SetAll&lt;>, etc..</p>
  
  <p>But this approach doesn't work everytime. For example, if the operating in the lock throws an exception, then the key remains locked. For this situation I've added DefaultLockExpire parameter to AcquireLock method to expire the "locked" key.</p>
  
  <p>Is there any better solution, or when do we need acquiring locks like "lock" blocks in multi-thread programming.</p>