42 writes to MaxDegreeOfParallelism
aspire (1)
Projects\ProjectLocator.cs (1)
70MaxDegreeOfParallelism = Environment.ProcessorCount
dotnet (1)
Commands\Test\MTP\MSBuildUtility.cs (1)
270new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount },
ILCompiler.Compiler (1)
Compiler\ILScanner.cs (1)
101new ParallelOptions { MaxDegreeOfParallelism = _parallelism },
ILCompiler.RyuJit (1)
Compiler\RyuJitCompilation.cs (1)
168new ParallelOptions { MaxDegreeOfParallelism = _parallelism },
Microsoft.Build (1)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
36private static readonly ParallelOptions s_parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount };
Microsoft.Build.Framework (1)
Utilities\FileMatcher.cs (1)
1026new ParallelOptions { MaxDegreeOfParallelism = dop },
Microsoft.CodeAnalysis (2)
InternalUtilities\RoslynParallel.cs (2)
15internal static readonly ParallelOptions DefaultParallelOptions = new ParallelOptions() { MaxDegreeOfParallelism = Environment.ProcessorCount }; 21? new ParallelOptions { CancellationToken = cancellationToken, MaxDegreeOfParallelism = Environment.ProcessorCount }
Microsoft.ML.Ensemble (1)
Trainer\EnsembleTrainerBase.cs (1)
148new ParallelOptions() { MaxDegreeOfParallelism = Args.TrainParallel ? -1 : 1 },
Microsoft.ML.FastTree (22)
Dataset\Dataset.cs (2)
267Parallel.For(0, NumFlocks, new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, 317Parallel.For(0, NumFlocks, new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads },
GamClassification.cs (1)
134Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
Training\Applications\ObjectiveFunction.cs (1)
79Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
Training\DcgCalculator.cs (4)
167new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, 268new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, 383Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 521Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
Training\DocumentPartitioning.cs (2)
97Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 129Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
Training\ScoreTracker.cs (3)
105Parallel.For(0, tree.NumLeaves, new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, (leaf) => 194Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 203Parallel.For(0, tree.NumLeaves, new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads },
Training\Test.cs (3)
565Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 640Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 698Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
Training\WinLossCalculator.cs (1)
63Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
TreeEnsemble\InternalRegressionTree.cs (3)
1395Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 1420Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions); 1443Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
TreeEnsemble\InternalTreeEnsemble.cs (1)
308Parallel.Invoke(new ParallelOptions { MaxDegreeOfParallelism = BlockingThreadPool.NumThreads }, actions);
Utils\ThreadTaskManager.cs (1)
59Parallel.Invoke(new ParallelOptions() { MaxDegreeOfParallelism = _num }, _actions);
Microsoft.ML.KMeansClustering (2)
KMeansPlusPlusTrainer.cs (2)
1396MaxDegreeOfParallelism = numThreads 1743MaxDegreeOfParallelism = numThreads
Microsoft.ML.StandardTrainers (2)
Standard\SdcaBinary.cs (2)
364var pOptions = new ParallelOptions { MaxDegreeOfParallelism = numThreads }; 2049var pOptions = new ParallelOptions { MaxDegreeOfParallelism = numThreads };
Microsoft.ML.Sweeper (2)
ConfigRunner.cs (1)
195_parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = options.NumThreads ?? -1 };
SynthConfigRunner.cs (1)
37_parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = options.NumThreads ?? -1 };
Microsoft.ML.Sweeper.Tests (1)
TestSweeper.cs (1)
325options.MaxDegreeOfParallelism = 4;
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
978Parallel.ForEach(projects, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount }, project =>
NuGet.CommandLine.XPlat (1)
Commands\Package\Update\PackageUpdateCommandRunner.cs (1)
362MaxDegreeOfParallelism = Environment.ProcessorCount,
NuGet.Commands (1)
RestoreCommand\RequestFactory\DependencyGraphSpecRequestProvider.cs (1)
91MaxDegreeOfParallelism = Environment.ProcessorCount
rzc (1)
GenerateCommand.cs (1)
375Parallel.For(0, outputs.Length, new ParallelOptions() { MaxDegreeOfParallelism = Debugger.IsAttached ? 1 : 4 }, i =>
14 references to MaxDegreeOfParallelism
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
91int rval = options.MaxDegreeOfParallelism;
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
91int rval = options.MaxDegreeOfParallelism;
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
91int rval = options.MaxDegreeOfParallelism;
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
91int rval = options.MaxDegreeOfParallelism;
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
91int rval = options.MaxDegreeOfParallelism;
System.Threading.Tasks.Parallel (9)
System\Threading\Tasks\Parallel.cs (9)
41/// This constructor initializes the instance with default values. <see cref="MaxDegreeOfParallelism"/> 72/// The <see cref="MaxDegreeOfParallelism"/> limits the number of concurrent operations run by <see 75/// cref="MaxDegreeOfParallelism"/> is -1, then there is no limit placed on the number of concurrently 79/// The exception that is thrown when this <see cref="MaxDegreeOfParallelism"/> is set to 0 or some 87ArgumentOutOfRangeException.ThrowIfZero(value, nameof(MaxDegreeOfParallelism)); 88ArgumentOutOfRangeException.ThrowIfLessThan(value, -1, nameof(MaxDegreeOfParallelism)); 114int rval = MaxDegreeOfParallelism; 246(parallelOptions.MaxDegreeOfParallelism != -1 && parallelOptions.MaxDegreeOfParallelism < actionsCopy.Length)