backpressure - Serbipunk/notes GitHub Wiki
Backpressure is when the progress of turning that input to output is resisted in some way. In most cases that resistance is computational speed — trouble computing the output as fast as the input comes in — so that’s by far the easiest way to look at it. But other forms of backpressure can happen too: for example, if your software has to wait for the user to take some action.
通常处理这种状态的策略有以下三种:
-
Buffer:将输入暂时保存下来
-
Drop:丢弃掉输入
-
Control:由消费者来控制生产者的速度