question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ParallelForEach not running input list in parallel

See original GitHub issue

We tried to use the ParallelForEach activity to run several activities at once, but they all ran sequentially. After looking into the ParallelForEach activity, we see that the activity uses the Combine(...) function. The CombinedResult uses a await, so not sure how it is supposed to run as parallel tasks.

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sfmskywalkercommented, Jul 4, 2023

That’s right. However, you can still achieve parallel activity execution in Elsa 2 by moving work to a background job and have the activity suspend itself until the background work completes, as outlined here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parallel.ForEach is not working as expected C# - ...
I am replacing ForEach to Parallel.ForEach. ForEach is working fine and gives result as expected where as Parallel.ForEach is giving unexpected ...
Read more >
Parallel.ForEach ends working in a single thread #46146
Problem - I have a list of a few hundreds of tasks to run in parallel, each task can take from a few...
Read more >
Write a simple Parallel.ForEach loop
This article shows how to use a Parallel.ForEach loop to enable data parallelism over any System.Collections.IEnumerable or System.Collections.
Read more >
Parallel.ForEach not always working - Microsoft Q&A
Each pair of statements executes the Solve() method on all the items in a List, and keeps a cumulative Boolean of the results....
Read more >
Parallel.ForEach seems useless in ASP.NET C# : r/csharp
Parallel.Foreach definitely allows running tasks simultaneously on multiple threads, assuming the compiler decides that is the best approach.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found