Static controls for starting named macro flows in parallel.
Syntax
FlowThis class cannot be constructed directly.
Parameters
None
Returns
—Behavior / side effects
Static controls for starting named macro flows in parallel. At most two background flows can run beside the main flow, and only one live invocation of a given named flow is allowed, including while it is paused or stopping. Flow.start() returns immediately after the coordinator accepts the branch; background flows may start peer flows. Variables are isolated per branch and never merge into the caller. The main flow waits for all background flows before Run completes. An invalid or duplicate name, a full background-flow limit, any branch error, System.stop(), or Main Stop ends the whole macro. Each numbered background dock control can temporarily Pause or Resume only that branch; it has no per-branch Stop. Main Pause or Resume applies to every branch, and global Resume also clears branch-local pause flags. Touch gestures from different branches can cancel each other. ScreenCapture and audio capture policies are shared globally. Storage shares the same persistent keys across branches and is not an inter-process messaging channel.
Execution
- Blocking: Conditional
- Thread safety: Use separate objects per flow
- Parallel execution: Yes
Flow.start creates an isolated background executor and returns an Int ordinal, not a handle. At most two background flows run with the main flow. The main flow waits for background completion; any flow error or System.stop() stops the entire Run.
Example
# Start a configured worker while the main flow keeps running
worker_no = Flow.start("watch_enemy", {"labels": ["boss", "guard"]})
MacroPanel.notify("Background flow #" + str(worker_no) + " started")Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Related APIs
Fields
| Name | Description |
|---|---|
paramsdict | Read-only copied input for the current branch. The main flow receives an empty dict. Each read returns safe data detached from coordinator and parent-VM collections. |