int oneIterationCount = src.Length / countIterations;
                  
                  
                              Parallel.For(0, countIterations, x =>
                  
                  
                              {
                  
                  
                                  int begin = x * oneIterationCount;
                  
                  
                                  int end = x == countIterations - 1 ? src.Length : (x + 1) * oneIterationCount;
                  
                  
                                  for (int i = begin; i < end; i++)
                  
                  
                                  { // обработка элементов } }
                  
                  
                
Чёт как костыли выглядит
Обсуждают сегодня