反压
🌐 Backpressure
拉流(pull streams)有自然的背压 —— 消费者控制节奏,所以源数据永远不会比消费者处理得快。推流(push streams)需要显式的背压,因为生产者和消费者是独立运行的。push()、broadcast() 和 share() 上的 budget 和 backpressure 选项控制这个机制是如何运作的。
🌐 Pull streams have natural backpressure -- the consumer drives the pace, so
the source is never read faster than the consumer can process. Push streams
need explicit backpressure because the producer and consumer run
independently. The budget and backpressure options on push(),
broadcast(), and share() control how this works.