The code below simply creates a List> of random numbers and then calculates the cumulative sum of each list in a parallel foreach loop. Why do I get less than \'numLists\' e
List is indeed not thread safe, so cumsupDataP.Add(...) is dropping data in unpredictable ways.
Replace that line with:
ConcurrentBag> cumsumDataP = new ConcurrentBag>();
and it will all work. Note that ConcurrentBag is unordered, but that is fine because you have no way of predicting the order from the threads anyway ;p