On 08/30/2011 09:23 PM, Paul Gilmartin wrote:
> 'addpipe *.input.C: | faninany | *.input.B:'
There's nothing to connect to on the other side of input C. A dangling
pipeline segment like this has to go from output to input so that it's
connected to your stage at both ends:
'addpipe *.output.C: | faninany | *.input.B:'
That's not going to give you the result you're looking for when you
sever output C, though. There won't be a dangling connection to
FANINANY waiting to be connected. Instead, FANINANY will see EOF and
terminate, and input B will be free to be connected again. In fact,
as soon as you connect a new pipeline to the near side of output C:
'addpipe literal +0.5' I 'fan | delay | *.output.C:'
the connection is redefined, and output C is available to be connected
again:
'select output C'
'streamstate output'
+++ RC(12) +++
Instead, you'll need to use the temporary connection to the input as you
did, and then in your CALLPIPE you'll need GATE (for example) to connect
the input to the output only until the other called pipeline
is done:
'addpipe literal +0.5' I 'fan | delay | *.input.C:'
'callpipe (end ?) *.input.B: | take 1 | c: count lines' ,
'| specs /read: / 1 1-* next | console' ,
'? c: | g: gate' ,
'? *.input.C: | g: | *.output.C:'
So if your goal is to avoid having to write a new CALLPIPE for each
combination of dynamically added input streams, this won't get you
there. Once you've connected them downstream with ADDPIPE or SHORT,
they're not available for you to sever and reconnect later.
¬R