12 instantiations of ParallelOptions
Microsoft.Build (3)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
32private static readonly ParallelOptions s_parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount };
BuildCheck\Infrastructure\BuildCheckCentralContext.cs (1)
114new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount },
FileMatcher.cs (1)
1016new ParallelOptions { MaxDegreeOfParallelism = dop },
Microsoft.Build.Tasks.Core (2)
FileIO\GetFileHash.cs (1)
81var parallelOptions = new ParallelOptions() { CancellationToken = _cancellationTokenSource.Token };
FileMatcher.cs (1)
1016new ParallelOptions { MaxDegreeOfParallelism = dop },
Microsoft.Build.Utilities.Core (1)
FileMatcher.cs (1)
1016new ParallelOptions { MaxDegreeOfParallelism = dop },
Microsoft.DotNet.SignTool (1)
src\BatchSignUtil.cs (1)
231ParallelOptions parallelOptions = new ParallelOptions();
MonoAOTCompiler (1)
MonoAOTCompiler.cs (1)
558new ParallelOptions { MaxDegreeOfParallelism = allowedParallelism },
MonoTargetsTasks (2)
EmitBundleTask\EmitBundleBase.cs (1)
163Parallel.For(0, remainingDestinationFilesToBundle.Length, new ParallelOptions { MaxDegreeOfParallelism = allowedParallelism, CancellationToken = BuildTaskCancelled.Token }, (i, state) =>
ILStrip\ILStrip.cs (1)
81new ParallelOptions { MaxDegreeOfParallelism = allowedParallelism },
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.cs (1)
139internal static readonly ParallelOptions s_defaultParallelOptions = new ParallelOptions();
WasmAppBuilder (1)
EmccCompile.cs (1)
165new ParallelOptions { MaxDegreeOfParallelism = allowedParallelism },
54 references to ParallelOptions
Microsoft.Build (1)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
32private static readonly ParallelOptions s_parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount };
Microsoft.Build.Tasks.Core (1)
FileIO\GetFileHash.cs (1)
81var parallelOptions = new ParallelOptions() { CancellationToken = _cancellationTokenSource.Token };
Microsoft.DotNet.SignTool (1)
src\BatchSignUtil.cs (1)
231ParallelOptions parallelOptions = new ParallelOptions();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1159[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ParallelOptions))]
netstandard (1)
netstandard.cs (1)
2111[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ParallelOptions))]
System.Threading.Tasks.Parallel (49)
System\Threading\Tasks\Parallel.cs (44)
26/// the default TaskScheduler (TaskScheduler.Default). <see cref="ParallelOptions"/> enables 36/// Initializes a new instance of the <see cref="ParallelOptions"/> class. 54/// associated with this <see cref="ParallelOptions"/> instance. Setting this property to null 93/// associated with this <see cref="ParallelOptions"/> instance. 139internal static readonly ParallelOptions s_defaultParallelOptions = new ParallelOptions(); 166/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 191public static void Invoke(ParallelOptions parallelOptions, params Action[] actions) 428/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 450public static ParallelLoopResult For(int fromInclusive, int toExclusive, ParallelOptions parallelOptions, Action<int> body) 465/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 487public static ParallelLoopResult For(long fromInclusive, long toExclusive, ParallelOptions parallelOptions, Action<long> body) 578/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 602public static ParallelLoopResult For(int fromInclusive, int toExclusive, ParallelOptions parallelOptions, Action<int, ParallelLoopState> body) 617/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 641public static ParallelLoopResult For(long fromInclusive, long toExclusive, ParallelOptions parallelOptions, 764/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 808int fromInclusive, int toExclusive, ParallelOptions parallelOptions, 829/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 873long fromInclusive, long toExclusive, ParallelOptions parallelOptions, 916ParallelOptions parallelOptions, 1197/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 1221public static ParallelLoopResult ForEach<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Action<TSource> body) 1267/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 1293public static ParallelLoopResult ForEach<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Action<TSource, ParallelLoopState> body) 1339/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 1365public static ParallelLoopResult ForEach<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Action<TSource, ParallelLoopState, long> body) 1435/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 1481ParallelOptions parallelOptions, Func<TLocal> localInit, 1554/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 1599public static ParallelLoopResult ForEach<TSource, TLocal>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TLocal> localInit, 1637ParallelOptions parallelOptions, 1695ParallelOptions parallelOptions, 1754ParallelOptions parallelOptions, 2123/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 2171ParallelOptions parallelOptions, 2187/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 2237ParallelOptions parallelOptions, 2253/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 2306ParallelOptions parallelOptions, 2328/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 2395ParallelOptions parallelOptions, 2416/// <param name="parallelOptions">A <see cref="System.Threading.Tasks.ParallelOptions">ParallelOptions</see> 2486ParallelOptions parallelOptions, 2508ParallelOptions parallelOptions,
System\Threading\Tasks\Parallel.ForEachAsync.cs (3)
56public static Task ForAsync<T>(T fromInclusive, T toExclusive, ParallelOptions parallelOptions, Func<T, CancellationToken, ValueTask> body) 253public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 408public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
System\Threading\Tasks\TaskReplicator.cs (2)
124private TaskReplicator(ParallelOptions options, bool stopOnFirstFailure) 130public static void Run<TState>(ReplicatableUserAction<TState> action, ParallelOptions options, bool stopOnFirstFailure)