Function holdingLoop

Create an auto-flushing valve loop. This is for use with a chain where the next valve is a holding valve. What this does is automatically run the outlet of the holding valve so it seamlessly flushes all data when required.

auto holdingLoop(Chain) (
  Chain chain
)
if (hasValve!Chain && __traits(isSame, TemplateOf!(PropertyType!(Chain.init.valve)), HoldingValveInlet));

Note that this will ONLY work if the first valve in the chain is a holdingValve.

The valve loop provides the flush function which allows you to flush any released data through the loop without extending. This function returns the number of elements flushed.

See holdingValve for a better explanation.