Throttled Parallel ForEach
The ThrottleParallelForEach
activity is similar to the ParallelForEach<T> activity with the one exception that it allows setting a concurrency factor to restrict the number of simultaneous branches to execute. The ThrottleParallelForEach
activity derives from NativeActivity, because it needs to schedule other activities (the child activities) and this is only accessible through the NativeActivityContext class.
Projects
The ThrottledParallelForEach sample contains the following projects.
ProjectName | Description | Main Files |
---|---|---|
ThrottledParallelForEach | Contains ThrottledParallelForEach activity and its designer. |
ThrottledParallelForEach.cs The ThrottledParallelForEach activity definition. |
CodeTestClient | Sample client application that configures and runs a workflow with a ThrottledParallelForEach using imperative code. |
Program.cs Defines and runs an instance of the sample workflow. |
To use this sample
Using Visual Studio, open the ThrottledParallelForEach.sln file.
To build the solution, press CTRL+SHIFT+B.
To run the solution, press F5.