title: Why is it a bad practice to lock the object we are going to change?
body: <p>Why is it a bad practice to use lock as in the following code, I'm assuming this is a bad practice based on the answers in <a href="https://stackoverflow.com/questions/7078535/c-sharp-lock-on-reference-passed-to-method-bad-practice">this SO question here</a></p>
  
  <pre><code>private void DoSomethingUseLess()
  {
      List&lt;IProduct&gt; otherProductList = new List&lt;IProduct&gt;();
      Parallel.ForEach(myOriginalProductList, product =&gt;
          {
             //Some code here removed for brevity
             //Some more code here :)
              lock (otherProductList)
              {
                  otherProductList.Add((IProduct)product.Clone());
              }
          });
  }
  </code></pre>
  
  <p>The answers over <a href="https://stackoverflow.com/a/7078748/507184">there</a> mentions that it is bad practice , but they don't say why</p>
  
  <p><strong>Note:</strong> Please ignore the usefulness of the code, this is just for example purpose and i know it is not at all useful</p>