rx-java - RxJava CombineLatest onError

标签 rx-java combinelatest

我将 RxJava CombineLatest 与两个可观察对象一起使用。 我的问题是,如果其中一个可观察对象以 onError 结尾,是否会调用组合 onNext?

文档显示了当两个 observable 都正确发出项目但我找不到在错误情况下会发生什么的快乐场景。

|----onError ----|可观察1

|------------ O ------ O ------|可观察2

|----------------?--------?----| CombineLatest - 会调用 onNext 吗?

最佳答案

一般契约是这样的:协调运算符在从任何源接收到第一个 onError 时终止,除非有一个 delayErrors 参数设置为 true 或运算符名称有 DelayError 后缀。

还有一个 rule combineLatest 关于空源短路:

If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated till that point). If that input source is also synchronous, other sources after it will not be subscribed to.

关于rx-java - RxJava CombineLatest onError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54862928/

相关文章:

Swift Combine : One publisher consumes another, 如何让两个流都退出

ios - 合并CombineLatest不等待上一个操作触发

android - 使用 RxJava 转换 HashMap 值

android - RxJava 网络请求和缓存

android - 将 Single's<User> 的 Flowable 转换为 List<User> 的 Flowable

Angular如何使用combineLatest组合来自网站网址栏的路线和查询

java - 在 Android 应用程序中集成 Google Photos Library API

java - 如何创建一个 Observable 来在完成后对 Observable 流进行 Margin 处理?

rxjs - 什么触发了 combineLatest?

javascript - 如何在某些可观察量中使用带有过滤器的combineLatest?