Skip to content

Commit 390d2a4

Browse files
Update ParallelExecutionHelper.cs
1 parent ada96d1 commit 390d2a4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ImageSharp.Drawing/Processing/Backends/ParallelExecutionHelper.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ public static int GetPartitionCount(int maxDegreeOfParallelism, int workItemCoun
3737
=> Math.Min(GetPartitionLimit(maxDegreeOfParallelism), Math.Min(workItemCount, secondaryLimit));
3838

3939
/// <summary>
40-
/// Creates the <see cref="ParallelOptions"/> for a partitioned operation while preserving the
41-
/// special meaning of <c>-1</c> in <see cref="ParallelOptions.MaxDegreeOfParallelism"/>.
40+
/// Creates the <see cref="ParallelOptions"/> for a partitioned operation.
4241
/// </summary>
4342
/// <param name="maxDegreeOfParallelism">
44-
/// The configured maximum degree of parallelism. A value of <c>-1</c> is propagated directly
45-
/// to <see cref="ParallelOptions.MaxDegreeOfParallelism"/>; positive values are capped to the
46-
/// smaller of the configured limit and the useful partition count.
43+
/// The configured maximum degree of parallelism. A value of <c>-1</c> retains the runtime's
44+
/// unbounded sentinel because <paramref name="partitionCount"/> is always positive; positive
45+
/// values are capped to the smaller of the configured limit and the useful partition count.
4746
/// </param>
48-
/// <param name="partitionCount">The computed number of useful partitions for the operation.</param>
47+
/// <param name="partitionCount">The computed positive number of useful partitions for the operation.</param>
4948
/// <returns>The <see cref="ParallelOptions"/> instance for the operation.</returns>
5049
public static ParallelOptions CreateParallelOptions(int maxDegreeOfParallelism, int partitionCount)
5150
=> new() { MaxDegreeOfParallelism = Math.Min(maxDegreeOfParallelism, partitionCount) };

0 commit comments

Comments
 (0)