Delay vs Pipe
Apr 16 2022 | 11:27 pm
Greetings, I ran into something unexpected with Delay. I thought I would verify.
Say I send a bang to Delay. Then I send another bang before the delay time is expired. The first bang does not get output. We just start delaying the second bang. It looks like if Delay receives a new bang before the first delay is finished, the delay timer is reset. If this is happening on a regular interval you end up with nothing coming out of the delay.
Pipe takes bangs as well as other datstypes, and it maintains the pipeline even if a new input is received before the delay is finished.
So pipe seems strictly superior, except in cases where you want to reset the delay timer if it hasn't finished yet. I suppose there might be usecases for this. But it seems like it would be easier to manage this usecase as an attribute of pipe rather than having a whole separate object that only takes bangs.
Curious if I'm missing the point here, or if anyone has any insight into why it works this way. Thanks!