Throttled Parallel ForEach
This topic applies to Windows Workflow Foundation 4 (WF4).
The ThrottleParallelForEach
activity is similar to the ParallelForEach 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
ProjectName |
Description |
Main Files |
ThrottledParallelForEach |
Contains |
ThrottledParallelForEach.cs The |
CodeTestClient |
Sample client application that configures and runs a workflow with a |
Program.cs Defines and runs an instance of the sample workflow. |
To use this sample
Using Visual Studio 2010, open the ThrottledParallelForEach.sln file.
To build the solution, press CTRL+SHIFT+B.
To run the solution, press F5.
Note: |
---|
The samples may already be installed on your machine. Check for the following (default) directory before continuing.
<InstallDrive>:\WF_WCF_Samples
If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.
<InstallDrive>:\WF_WCF_Samples\WF\Scenario\ActivityLibrary\ThrottledParallelForEach
|