title: Return thread to ThreadPool on lock
body: <p>When I lock on a thread on the ThreadPool like this the thread is blocked:</p>
  
  <pre><code>private static object _testServerLock = new object();
  private static TestServer _testServer = null;
  
  public TestServer GetServer()
  {
    lock (_testServerLock)
    {
      if (_testServer == null)
      {
        _testServer = new TestServer(); // does some async stuff internally
      }
    }
    return _testServer;
  }
  </code></pre>
  
  <p>If I have too more concurrent threads calling this than I have threads in the ThreadPool all of them will end up waiting for the lock, while async code happening elsewhere can't continue since it is waiting for a free thread in the ThreadPool.</p>
  
  <p>So I don't want to block the thread, I need to return it to the ThreadPool while I am waiting.<br>
  Is there some other way to lock which returns the waiting thread to the ThreadPool?</p>