Skip to Content
Microsoft Windows Workflow Foundation 4.0 Cookbook
book

Microsoft Windows Workflow Foundation 4.0 Cookbook

by Andrew Zhu
September 2010
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 16m
English
Packt Publishing
Content preview from Microsoft Windows Workflow Foundation 4.0 Cookbook

Using the ParallelForEach<T> activity

ParallelForEach<T> is actually a special ForEach<T> activity. The difference between ParallelForEach<T> and ForEach<T> is that ParallelForEach<T>'s embedded statements are scheduled and run asynchronously. ParallelForEach<T> itself is akin to a Parallel activity for its child activities. Let's create a sample to see how it works.

How to do it...

  1. Create a workflow project:

    Create a new Workflow Console Application under solution Chapter02 and name the project UsingParallelForEachActivity.

  2. Create a workflow:

    Open Workflow1.xaml and author a workflow as shown in the following screenshot:

    How to do it...

    Set the properties of both ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Essential Windows Workflow Foundation

Essential Windows Workflow Foundation

Dharma Shukla, Bob Schmidt

Publisher Resources

ISBN: 9781849680783Other