title: Does BlockingCollection<T> guarantee removal order?
body: <p>I have a bounded blocking queue in an application that was written several years ago.  Let's just say that the implementation is less than stellar, but it's worked.  However, it has some performance problems.  It looks like the .NET 4.0 <code>BlockingCollection&lt;T&gt;</code> is the right replacement, but I need to make sure that it is actually a queue.  That is, is it guaranteed to be strictly FIFO if used in a single-producer, single-consumer fashion?</p>
  
  <p>The documentation doesn't specifically say.  The <a href="http://msdn.microsoft.com/en-us/library/dd267312.aspx" rel="noreferrer">BlockingCollection</a> topic does say (in the Remarks):</p>
  
  <blockquote>
    <p><code>BlockingCollection&lt;T&gt;</code> is similar to a
    traditional blocking queue data
    structure, except that the underlying
    data storage mechanism is abstracted
    away as an <code>IProducerConsumerCollection&lt;T&gt;</code>.</p>
  </blockquote>
  
  <p>But nothing specifically says that things will be removed in the same order they're added.</p>
  
  <p>Anybody know for sure?</p>