title: Lock mechanism for Queue<T> during Enqueue and Dequeue
body: <p>In Queue, enqueue and dequeue both need a write lock. Why would someone use ReaderWriterLockSlim versus just using lock{}? As an example,</p>
  
  <p>Using ReaderWriterLockSlim</p>
  
  <pre><code>qLock.EnterWriteLock(); 
  try 
  { 
      localQ.Enqueue(item); // or localQ.Dequeue(item)
  } 
  
  finally 
  { 
      qLock.ExitWriteLock(); 
  } 
  </code></pre>
  
  <p>Versus lock{}</p>
  
  <pre><code>try 
  { 
      lock(qLock) { localQ.Enqueue(item);} // or localQ.Dequeue(item)
  } 
  </code></pre>