Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当有一个快速的生产者和缓慢的消费者时,我想用最新的替换所有旧的等待排放 - 类似于 RxJava 的Emitter.BackpressureMode.LATEST
有没有办法在 RxDart 或 Dart Streams 中实现这一点?
嗨,我好像来晚了)
但也许它会帮助其他人对于 rxDart 中的背压,有 Debounce 方法。
例子:
subject.debounce(new Duration(milliseconds: 500)).listen((s) => print(s));
更多信息:
https://www.youtube.com/watch?v=u9VgxH-X_7s