title: c# threads synchronisation
body: <p>I need to use lock object, but it is already used by another thread. I wish to wait while the lock object will be free but have no idea how to do this. </p>
  
  <p>I found sth like:</p>
  
  <pre><code>if(Monitor.TryEnter(_lock)
  {
  try
  {
      // do work
  }
  finally
  {
      Monitor.Exit(_lock);
  }
  
  }
  </code></pre>
  
  <p>But I it just check and go on, but I wish to wait until lock object is free. </p>