gpt4 book ai didi

android - rxjava : be notified when multiple observables have completed

转载 作者:行者123 更新时间:2023-11-30 01:53:54 24 4
gpt4 key购买 nike

我在 Android 上使用 rxjava 和 retrofit。我有几个一起启动的改造可观察对象,它们都在不同的线程中运行。

当所有这些都完成时,我希望收到通知(通过回调)。

我在文档中查看了各种 Observable 的“组合”函数,但找不到一个可以执行此操作的函数。

有什么想法吗?

谢谢,再见,马可

最佳答案

经过更多挖掘,我想我要找的是:

http://reactivex.io/documentation/operators/zip.html

http://reactivex.io/documentation/operators/combinelatest.html

在我看来,当 Observables 只发射一个项目时(即它们可以 bi Single),zip 和 combinelatest 的行为类似。

关于android - rxjava : be notified when multiple observables have completed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32569362/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com