android10 / android10/Android-CleanArchitecture-Kotlin

How to run usecases in parallel?

未关闭
#42 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
discussion question
主要语言
Kotlin
星标
4.8k
派生
929
PR 合并指标
30 天内没有已合并 PR

描述

I learned a lot by reading this architecture. But in my real life project, viewmodel needs to run 2 or more usecases in prallel and join the result to update the ui. With coroutine in my current code, my code is like this
```
val job1 = async {usecase A}
val job2 = async {usecase B}
processResults(job1.await(),job2.await()) // This combine two result and do some calculation here
```
However, For Either class with either() method, I don't know how to achieve this.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。