When a LogiX chain consists of multiple Impulse receiving or sending/emitting nodes these nodes are usually executed in sequence within the same internal context.
For example, in the following image we have 3 writes which will occur in sequence:
There are however some nodes which split an impulse chain into multiple chains, in this case the new chains will occur in a different context. The best example of this is the Sequence node which splits an Impulse chain into any number of other chains.
Effects of Splitting
When a split occurs the following things may happen depending on the nodes being used around this split:
- Temporary / Transient values will be unusable after the split E.g.:
- The values coming out of Dynamic Impulse with Value nodes
- The values coming out of HTTP or Web Socket Nodes
- The Slot coming out of a Duplicate Slot node
- Values which change or update may be different then expected:
- The iteration value of a For loop node
- Any values which change over time such as those which rely on T or a user's location
Nodes which cause splits
Here's a list of nodes which will cause a split:
- Delay / Delay with Value
- Updates Delay / Updates Delay with Value
- For & While
- Pulse Random
There may be others, please update this list if you find more
Mitigating issues involved in Splitting
If you need to use values or items that change after splitting you can:
- Use Updates Delay with Value or Delay with value to preserve a value through a Delay.
- Use Value Register/Storage nodes to persist a value.