title: Collection was modified after the enumerator was instantiated error
body: <p>I'm trying to print multiple PDF byte arrays. Since I need the functionality to allow users to be able to print multiple reports simultaneously, I'm using a Parallel foreach.  The function gets through the first byte array fine, but on the second Dequeue I get the "Collection was modified after the enumerator was instantiated." error. How do I fix this while still allowing the users to print simultaneously?</p>
  
  <p>Here's the code: </p>
  
  <pre><code>public static void PrintingQueue(Queue&lt;byte[]&gt; printQueue, string printer, int copies)
      {
          Parallel.ForEach(printQueue, (currentFile) =&gt;
          {
              var printFile = printQueue.Dequeue();
              PrintWithGSPrint(printFile, printer, copies);
  
          });
      }
  </code></pre>