title: How to transfer locks between threads?
body: <p>I would like to</p>
  
  <pre><code>Monitor.Enter(this.StaticLock);
  try
  {
      // Do something ...
  
      ThreadPool.QueueUserWorkItem(state =&gt;
      {
          try
          {
               // Do something else...
  
          }
          finally
          {
              Monitor.Exit(this.StaticLock);
          }
      });
  }
  catch (Exception)
  {
      Monitor.Exit(this.StaticLock);
      throw;
  }
  </code></pre>
  
  <p>But it doesn't work since the it can't <code>Monitor.Exit</code> on an object that wasn't <code>Monitor.Enter</code> in the current thread. How to do that? Should I use interthread communication?</p>