简体   繁体   English

Highland.js如何实现背压?

[英]How does Highland.js implement backpressure?

How exactly does Highland.js implement backpressure? Highland.js如何完全实现背压? I'm curious about this. 我对此很好奇。

https://github.com/caolan/highland/blob/2.6.0/lib/index.js#L808 https://github.com/caolan/highland/blob/2.6.0/lib/index.js#L808

It looks like consumers ask the stream they are consuming to check any other consumers it may have every so often. 似乎消费者要求他们消费的流来检查它可能经常遇到的任何其他消费者。 If any of those consumers are in the paused state, the parent stream pauses as well. 如果这些使用者中的任何一个处于paused状态,则父流也将暂停。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM