title: Change thread priority from lowest to highest in .net
body: <p>I am trying to speed things by having one thread write to a linked list and another thread process the linked list. </p>
  
  <p>For some reason if the method that writes to the linked list I make it into a task and the method that reads from the linked list a low priority thread the program finishes as a whole much faster. In other words I experiense fastests results when doing:</p>
  
  <pre><code> Task.Factory.StartNew( AddItems );
  
   new Thread( startProcessingItems ) { Priority = ThreadPriority.Lowest }.Start();
  
   while(completed==false)
      Thread.Sleep(0);
  </code></pre>
  
  <p>Maybe because the first task is doing so much extra work than the other thread that's why everything as a whole will finish faster if I set the second method a low priority.</p>
  
  <p><strong>Anyways now my question is</strong> The <code>startProcessingItems</code> runs with ThreadPriority = Lowest. How could I change it's priority to highest? If I create a new Task in that method will it be running with low priority? Basically the startProcessingItems ends with a list and once it has that list I will like to start executing with highest priority. </p>