Skip to main content

Module parallel

Module parallel 

Source
Expand description

Branches that run at the same time (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md §3.7).

When a block has several successors they are ready together, and the ones that only read the run and give an output (an Agent, an API call, a Message, a Task, a Notify, an App query, a Spawn, a Transform, a Condition) run together as a batch: up to PARALLELISM blocks, of which at most MAX_AGENTS start an agent. The fleet’s limit of three unattended agent runs counts a drone run as one run, so a run starts one agent at a time, as before, until a run can reserve shared agent capacity; the other blocks of a batch only read, call or send. Each block of a batch reads the run as it was when the batch began; their outputs are taken up one by one in the order they were readied, so what the run does next does not depend on which finished first. A block that writes the run (Variables, Response), waits, calls or loops is not batched: it runs by itself, as before.

The run keeps a checkpoint that lists every block of the batch that has effects as running before any of them starts, so a restart asks about each of them in turn.

Structs§

Pure 🔒
What a block of a batch came to.

Constants§

MAX_AGENTS 🔒
The most blocks that start an agent at once in one run. The fleet’s limit of unattended agent runs counts each drone run as one, so a run that started more would exceed it with the others.
PARALLELISM 🔒
The most blocks that run at once.

Functions§

is_pure 🔒
The kinds that only read the run and give an output.
run_pure 🔒
A block’s code on its own copy of the run’s scope: the same limit of time, the same retries and the same stop as Scheduler::guarded gives a block that runs by itself.