rxjava :在多个可观察对象完成时收到通知
rxjava : be notified when multiple observables have completed
我在 Android 上使用 rxjava 和改造。
我有几个一起启动的改造可观察对象,并且所有 运行 在不同的线程中。
当所有这些都完成时,我希望收到通知(通过回调)。
我查看了文档中的各种 Observable 'combine' 函数,但找不到一个可以执行此操作的函数。
有什么想法吗?
谢谢,
再见,
马可
经过更多挖掘,我想我要找的是:
http://reactivex.io/documentation/operators/zip.html
或
http://reactivex.io/documentation/operators/combinelatest.html
在我看来,当 Observables 只发射一个项目时(即它们可以 bi Single),zip 和 combinelatest 的行为类似。
我在 Android 上使用 rxjava 和改造。 我有几个一起启动的改造可观察对象,并且所有 运行 在不同的线程中。
当所有这些都完成时,我希望收到通知(通过回调)。
我查看了文档中的各种 Observable 'combine' 函数,但找不到一个可以执行此操作的函数。
有什么想法吗?
谢谢, 再见, 马可
经过更多挖掘,我想我要找的是:
http://reactivex.io/documentation/operators/zip.html
或
http://reactivex.io/documentation/operators/combinelatest.html
在我看来,当 Observables 只发射一个项目时(即它们可以 bi Single),zip 和 combinelatest 的行为类似。