I have an extension method for IEnumerable, which then iterates through the collection, making it a business, and then returns a new IEnumerable.
I tried using PLINQ using .AsParallel (). ForAll (), which significantly speeds up iterations (which, of course, should do), however, when the collection returns, this collection often has several objects that are zero.
I guess this could be because he is returning the collection before all the "business" has a chance to complete? if I debug and put in a breakpoint, then there are no zeros.
Is there any waiting method for this operation that I should use?
EDIT: to be a little clearer, there is business logic in forall, changing properties, etc. it is necessary that the action is looped, and not just something.
c # plinq
benpage
source share