Expand description
Loop-while wrapper. Iterates the inner op as long as the
op-template’s while: Polydat expression evaluates truthy. On
each iteration the wrapper:
- Checks the activity-global stop flag. If set, the loop
returns
OpResult::skipped(no further iterations). Used to drain non-daemon while loops cleanly on session stop, and as a belt-and-braces secondary signal for daemon while loops (the daemon body’s tokio::select! cancels the future independently). - Reads the synthesised
__whilebinding via the pull plan. The op-kernel synthesis appends__while := <expr>to the kernel’s result bindings — same path metrics’ value expressions take — so referenced wires are auto-externed and read from the right cells. - If the condition is falsy, returns
OpResult::skipped(loop exit). Otherwise calls the inner dispenser; an Err propagates and breaks the loop, an Ok continues.
Composition: while: sits outer of result/metrics /
traverse (so the inner’s result captures land before the
next iteration’s predicate check) and inner of if: /
memo (so the conditional short-circuit fires before the
loop starts, and the memo emits after the loop concludes).
Structs§
- While
Wrapper - Wraps an inner OpDispenser with a loop driven by a GK boolean expression. See module docs.
Constants§
- BINDING_
NAME - Internal kernel-output name the wrapper pulls. The op-
kernel synthesiser appends
__while := <expr>to the kernel’s result-bindings source so the expression’s free identifiers get auto-externed (same path metrics take). - NAME
- Wrapper name.