C # Parallel.ForEach does not use available processor power

I run the application on a quad-core computer, and it maximizes when using about 14% of the processor and stays there pretty constantly.

Parallel.ForEach(pages, new ParallelOptions { }, page => { // do some CPU intensive stuff }); 

Only if I run several instances of the application will I get more than 14%. By doing this, I can get almost 100%.

Why is Parallel.ForEach not performing the task in parallel enough to use the entire processor?

I am running C # .NET 4.5.1.

+5
source share

All Articles