Skip to content

Commit 8fef544

Browse files
Clarify the meaning of MaxDegreeOfParallelism = -1 (#7879)
1 parent f5192c4 commit 8fef544

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Threading.Tasks/ParallelOptions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ By default, methods on the <xref:System.Threading.Tasks.Parallel> class attempt
170170
<format type="text/markdown"><![CDATA[
171171
172172
## Remarks
173-
The <xref:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism%2A> property affects the number of concurrent operations run by <xref:System.Threading.Tasks.Parallel> method calls that are passed this <xref:System.Threading.Tasks.ParallelOptions> instance. A positive property value limits the number of concurrent operations to the set value. If it is -1, there is no limit on the number of concurrently running operations.
173+
The <xref:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism%2A> property affects the number of concurrent operations run by <xref:System.Threading.Tasks.Parallel> method calls that are passed this <xref:System.Threading.Tasks.ParallelOptions> instance. A positive property value limits the number of concurrent operations to the set value. If it is -1, there is no limit on the number of concurrently running operations (with the exception of the <xref:System.Threading.Tasks.Parallel.ForEachAsync%2A> method, where -1 means <xref:System.Environment.ProcessorCount%2A>).
174174
175175
By default, <xref:System.Threading.Tasks.Parallel.For%2A> and <xref:System.Threading.Tasks.Parallel.ForEach%2A> will utilize however many threads the underlying scheduler provides, so changing <xref:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism%2A> from the default only limits how many concurrent tasks will be used.
176176

0 commit comments

Comments
 (0)