push

Convenience mechanism to wrap a specified output pipeline with a holding loop. It avoids having to explicitly specify the loop begin and end.

push
(
alias pipeline
bool autoFlush = true
Chain
)
(
Chain c
)
if (
isIopipe!(typeof(pipeline(c.holdingValve)))
)

Parameters

pipeline

a lambda template used to generate the pipeline that will be set up as a push chain.

autoFlush

true (default) if you wish to auto-flush the push pipeline when all references to it are gone. This moves the whole chain into a RefCounted struct which automatically flushes any remaining data that hasn't been flushed.

c Chain

An ioPipe to be used as the source for the data being pushed.

Return Value

Type: auto

A wrapped chain that will push any data that is released as needed (i.e. as the buffer fills up).

Note: If autoFlush is false, you will need to manually call flush on the pipeline after all processing is done.

Meta