isTerminal property

  1. @override
bool get isTerminal
override

A boolean indicator identifying whether this Cell acts as a Processing Sink within the reactive topology.

In the Cell-Mitosis architecture, a Terminal Node is a specialized component that possesses the internal logic to process pulses and maintain state, but lacks the propagation mechanisms required to broadcast its updates to downstream dependents.

Architectural Significance: The Reactive Sink

Terminal nodes represent the leaf nodes of a reactive graph. Unlike standard transit nodes, terminal nodes do not maintain a registry of downstream observers, making them significantly more memory-efficient for high-frequency updates where only the final side-effect matters.

When to use

  • Observation & Side-Effects: Identifying cells created via Cell.observe or Cell.sink, which are intended to bridge the reactive world into imperative systems (like logging or database I/O).
  • Performance Tuning: Detecting nodes that will never trigger cascade updates, allowing for optimizations in batch processing or atomic transactions.
  • Topology Mapping: Used by framework-level tools to visualize the boundaries and "exit points" of a reactive circuit.

How it works

  1. Synapse Absence: A terminal node is initialized with Synapses.disabled, preventing it from establishing outgoing connections or consuming resources for observer management.
  2. Pulse Absorption: When a terminal node receives a Pulse, it updates its internal state and executes its Instruction, but the signal propagation terminates at this node.
  3. Memory Efficiency: Since no observer links are created, terminal nodes are easier for the garbage collector to reclaim once their parent handle is released.

Returns:

  • true: If this cell is a terminal sink with no outgoing notification capabilities.
  • false: If this is a transit node that broadcasts state changes to downstream observers.

Implementation

@override
bool get isTerminal => _nucleus.synapses == Synapses.disabled;