Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 4
 MaxDegreeOfParallelism Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
.NET Framework Class Library
ParallelOptions..::.MaxDegreeOfParallelism Property

Gets or sets the maximum degree of parallelism enabled by this ParallelOptions instance.

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic
Public Property MaxDegreeOfParallelism As Integer
    Get
    Set
C#
public int MaxDegreeOfParallelism { get; set; }
Visual C++
public:
property int MaxDegreeOfParallelism {
    int get ();
    void set (int value);
}
F#
member MaxDegreeOfParallelism : int with get, set

Property Value

Type: System..::.Int32
An integer that represents the maximum degree of parallelism.
ExceptionCondition
ArgumentOutOfRangeException

The exception that is thrown when this MaxDegreeOfParallelism is set to 0 or some value less than -1.

The MaxDegreeOfParallelism limits the number of concurrent operations run by Parallel method calls that are passed this ParallelOptions instance to the set value, if it is positive. If MaxDegreeOfParallelism is -1, then there is no limit placed on the number of concurrently running operations.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker