Wild Goat
Wild Goat

Reputation: 3579

.NET Workflow parallel execution

I have created Workflow and I have my code activity which is doing expensive query. I want make execution of my activity (TagData) in Parallel. But for some reason this 'ParallelFroEach' block is working as simple ForEach loop and does not execute it in parallel. Why? Do I missed something?

enter image description here

Thanks!

Upvotes: 1

Views: 430

Answers (1)

Ron Jacobs
Ron Jacobs

Reputation: 3279

It all depends on how the TagData activity behaves. If this activity is async and it does I/O (as I suspect it does) then you will see multiple TagData activities working at the same time albeit on the same thread. Workflows only have one thread of execution. That is why it is important to do async wherever possible.

For more information see The Workflow Parallel Activity and Task Parallelism

Upvotes: 1

Related Questions