Fork

A special block that starts a new fiber by copying the state of the current one.

Both the current and the newly created fiber will proceed immediately without pause and run simultaneously.

This block has both an OK and a NEW outcome. The NEW path is executed by the newly created child fiber, the OK path is executed, as usual, by the current (parent) fiber.

The child fiber will run independently but can be stopped from the forking (parent) fiber using the Fiber stop block. Variable values are also independent, the newly created child fiber starts with a clone of the parent fiber variables, so modifying a variable in one fiber doesn’t affect the other fiber.

Since a fiber has little use of its own URI, the child fiber URI output variable is only assigned in the forking (parent) fiber, and the parent fiber URI in the newly created (child) fiber.

Note! The NEW path should never reconnect back to the main path in the parent fiber since it will exponentially create more and more fibers.

Usage examples

Options

Output variables