title: Parallel.ForEach freezing on last loop
body: <p>It seems my Parallel.ForEach loop freezes on it's last loop. I'm trying to loop through a string array and this is my syntax,</p>
  
  <pre><code>String [] split = checkerInput.Text.Split('\n');
  
  int threads = Properties.Settings.Default.Threads;
  int chunkSize = (split.Count() - 1 + threads - 1) / threads;
  
  ParallelOptions pOptions = new ParallelOptions
  {
      MaxDegreeOfParallelism = threads,
      CancellationToken = cts.Token
  };
  
  Parallel.ForEach(Partitioner.Create(1, split.Count() + 1, chunkSize), line =&gt;
  {
      for (int i = line.Item1; i &lt; line.Item2; i++)
      {
          try
          {
              string str = split[i - 1];
              //...String stuff...
              pOptions.CancellationToken.ThrowIfCancellationRequested();
          }
          catch (OperationCanceledException)
          {
              //...Stop stuff...
          }
      }
  }
  </code></pre>
  
  <p>I increase split.Count() by one in the Partitioner because it seemed to miss out the last line of the array and I minus i by one so that there's an offset (Since Line 1 would be split[0], not split[1]).</p>
  
  <p>It's going all fine until it reaches the last line of the array and just decides to freak out and freeze with no error. It's weird because I have another Parallel.ForEach loop that works just fine, only it loops x amount of times and not x amount of lines in a string array.</p>
  
  <p>Any help would be much appreciated!</p>