title: Why is lock(this) {...} bad?
body: <p>The <a href="https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/c5kehkcz(v=vs.110)" rel="noreferrer">MSDN documentation</a> says that</p>
  <pre><code>public class SomeObject
  {
    public void SomeOperation()
    {
      lock(this)
      {
        //Access instance variables
      }
    }
  }
  </code></pre>
  <p>is &quot;a problem if the instance can be accessed publicly&quot;. I'm wondering why? Is it because the lock will be held longer than necessary? Or is there some more insidious reason?</p>