On Sep 7, 2011, at 15:52, Glenn Knickerbocker wrote:

> On 09/07/2011 01:38 PM, Paul Gilmartin wrote:
>> How might I do this with other stages?  I suppose I haven't sufficient 
>> stamina.
> 
> No other stages, just one huge FANINANY with at least as many input
> streams as you might ever need:
>   ...
> Then just connect each new pipeline to the next available output.  And,
> actually, when you run out, you can use this exact same routine again to
> add another big FANINANY.
>  
It's sneakier than that.  The program:

 WARP2    REXX     M1  V 133  Trunc=133 Size=15 Line=3 Col=1 Alt=0              
* * * Top of File * * *                                                         
/* Rexx */ signal on novalue;  /* =================================== */        
trace Err                                                                       
                                                                                
'addpipe warp FOO | > WARP LOG A'                                               
                                                                                
'addpipe  literal +1 | delay | warp FOO' /* ??? */                              
                                                                                
'callpipe literal +1.0   do other stuff for a while. | delay | console'         
do K = 1 until RC<>0                                                            
    if right( K, 3 )=0   then  do                                               
       'callpipe literal +0.050000' K '| delay | console'                       
       end                                                                      
    'addpipe  literal' K '| warp FOO';  end                                     
say 'exiting with K =' K';  RC =' RC                                            
/*=================================================================== */        
* * * End of File * * *  

was still going strong after a quarter million iterations, an unreasonable
numbe of connectors to FANINANY.  With proper care, WARP seems to be
serially reusable.

But if I omit the CALLPIPE DELAY which seems to give it breathing
room, it suffocates by resource exhaustion after a few thousand.

-- gil

Reply via email to