Skip to content

Concurrency

Concurrency is a powerful feature in your action graph that helps nodes run simultaneously, improving performance and execution times.

Several nodes enable concurrent execution of subsequent nodes, such as Concurrent For Loop, Concurrent For Each Loop, Concurrent Execution, and others. Simply put, these nodes help make your action graph execute much faster.

When nodes run concurrently, they take advantage of your system's resources to maximize performance. Even if you run several million nodes concurrently, the runtime can handle them efficiently by distributing the workload across multiple CPU cores.

Basic Concurrency#

In the following example we have a Concurrent Execution node that runs two File Write nodes in parallel.

Populated Ports#

In the example below, the Concurrent Execution node executes two nodes concurrently. One of the nodes accesses the output of the other one. This connection is problematic because the output of the first node may not be available yet. This will eventually result in a runtime error. In future versions, these connections won't be able to be created in the first place.

Limitations#

There are some limitations to consider when it comes to concurrency. While the runtime is designed to manage a huge number of tasks concurrently, the execution is still subject to system and operating system constraints. Starting a large number of external processes or initiating thousands of network requests can lead to poor performance or even runtime errors.