Share via


Propriété MaxConcurrentExecutables

Gets or sets the number of threads that a package can create.

Espace de noms :  Microsoft.SqlServer.Dts.Runtime
Assembly :  Microsoft.SqlServer.ManagedDTS (en Microsoft.SqlServer.ManagedDTS.dll)

Syntaxe

'Déclaration
Public Property MaxConcurrentExecutables As Integer
    Get
    Set
'Utilisation
Dim instance As Package
Dim value As Integer

value = instance.MaxConcurrentExecutables

instance.MaxConcurrentExecutables = value
public int MaxConcurrentExecutables { get; set; }
public:
property int MaxConcurrentExecutables {
    int get ();
    void set (int value);
}
member MaxConcurrentExecutables : int with get, set
function get MaxConcurrentExecutables () : int
function set MaxConcurrentExecutables (value : int)

Valeur de propriété

Type : System. . :: . .Int32
An Integer that contains the number of threads that a package can create.

Notes

Valid values are one and higher, or -1. Other values are invalid. A value of -1 allows the maximum number of concurrently running executables to equal the number of processors plus two. Setting this property to zero or any other negative value fails with an error code that indicates an invalid argument.

This property is used when parallelism exists in the workflow. If the workflow is a series of sequential precedence constraints, then this property has no effect.

Exemples

The following code example sets the MaxConcurrentExecutables to 1, and sets that value on the ForEachLoop so the ForEachLoop will run one task at a time.

Package p;
p.MaxConcurrentExecutables = 1;
ForEachLoop loop;
loop.MaxConcurrent = p.MaxConcurrentExecutables;
Dim p As Package
p.MaxConcurrentExecutables = 1
Dim loop As ForEachLoop
loop.MaxConcurrent = p.MaxConcurrentExecutables