title: Why does this code not end in a deadlock
body: <p>I have this C# code:</p>
  
  <pre><code>public class Locking
  {
  
      private int Value1; private int Value2;
  
      private object lockValue = new Object();
      public int GetInt1(int value1, int value2)
      {
          lock (lockValue)
          {
              Value1 = value1;
              Value2 = value2;
              return GetResult();
          }
  
      }
  
      public int GetInt2(int value1, int value2)
      {
          lock (lockValue)
          {
              return GetInt1(value1, value2);
          }
      }
  
      private int GetResult()
      {
          return Value1 + Value2;
      }
  
  
  }
  </code></pre>
  
  <p>So basically I expect a deadlock if I execute <code>GetInt2</code> but the code just executes. Any good explanation. </p>