title: Exceptions inside the lock block
body: <p>Say, if I have the following block on C# code:</p>
  
  <pre><code>public class SynchedClass
  {
      public void addData(object v)
      {
          lock(lockObject)
          {
              //Shall I worry about catching an exception here?
  
              //Do the work
              //arr.Add(v);
          }
      }
      private List&lt;object&gt; arr = new List&lt;object&gt;();
      private object lockObject = new object();
  }
  </code></pre>
  
  <p>Shall I attempt to catch exceptions inside the <code>lock</code> block? (My main concern is that the exception may be raised inside the lock which will prevent the lock from being "unlocked".)</p>