Skip to content

Commit 2868a56

Browse files
committed
Fix warning
1 parent 133f0a6 commit 2868a56

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CodeJam.Main/Threading/TaskHelper.ForEachAsync.cs

+8
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,20 @@ private static int ProcessorCount
4141
}
4242
}
4343

44+
#if NETSTANDARD20_OR_GREATER || NET45_OR_GREATER || TARGETS_NETCOREAPP
4445
/// <summary>
4546
/// Gets the maximum degree of parallelism for the scheduler.
4647
/// Matches to the <see cref="Parallel.ForEach{TSource}(IEnumerable{TSource}, Action{TSource})"/> behavior.
4748
/// Limits <paramref name="value"/> by <see cref="TaskScheduler.MaximumConcurrencyLevel"/> value (if non-zero positiver value).
4849
/// Otherwise, uses <see cref="Environment.ProcessorCount"/> as fallback value.
4950
/// </summary>
51+
#else
52+
/// <summary>
53+
/// Gets the maximum degree of parallelism for the scheduler.
54+
/// Limits <paramref name="value"/> by <see cref="TaskScheduler.MaximumConcurrencyLevel"/> value (if non-zero positiver value).
55+
/// Otherwise, uses <see cref="Environment.ProcessorCount"/> as fallback value.
56+
/// </summary>
57+
#endif
5058
public static int GetMaxDegreeOfParallelism([NotNull] this TaskScheduler scheduler, int value)
5159
{
5260
Code.NotNull(scheduler, nameof(scheduler));

0 commit comments

Comments
 (0)