Answers for "C# parallel for loop specify cores"

C#
0

C# parallel for loop specify cores

ParallelOptions op = new ParallelOptions();
op.MaxDegreeOfParallelism = Environment.ProcessorCount / 2 ;
Parallel.ForEach(tokensFiles, op, filePath =>  DoSomething());
Posted by: Guest on January-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language