title: Is it Safe to use ReaderWriterLockSlim in an async method
body: <p>Since the <code>ReaderWriterLockSlim</code> class uses Thread ID to see who owns the lock is it safe to use with async methods where there is no guarantee that all the method will be executed on the same thread.</p>
  <p>For example.</p>
  <pre><code>    System.Threading.ReaderWriterLockSlim readerwriterlock = new System.Threading.ReaderWriterLockSlim();
      private async Task Test()
      {
          readerwriterlock.EnterWriteLock();
          await Task.Yield(); //do work that could yield the task
          readerwriterlock.ExitWriteLock(); //potentailly exit the lock on a different thread
      }
  </code></pre>