Skip to content

Commit f5cf5c0

Browse files
Update src/ImageSharp.Drawing/Processing/Backends/ParallelExecutionHelper.cs
Co-authored-by: Anton Firszov <antonfir@gmail.com>
1 parent 5c821fc commit f5cf5c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static int GetPartitionCount(int maxDegreeOfParallelism, int workItemCoun
4848
/// <param name="partitionCount">The computed number of useful partitions for the operation.</param>
4949
/// <returns>The <see cref="ParallelOptions"/> instance for the operation.</returns>
5050
public static ParallelOptions CreateParallelOptions(int maxDegreeOfParallelism, int partitionCount)
51-
=> new() { MaxDegreeOfParallelism = maxDegreeOfParallelism == -1 ? -1 : Math.Min(maxDegreeOfParallelism, partitionCount) };
51+
=> new() { MaxDegreeOfParallelism = Math.Min(maxDegreeOfParallelism, partitionCount) };
5252

5353
/// <summary>
5454
/// Computes the internal partition-planning cap for the configured parallelism setting.

0 commit comments

Comments
 (0)