android10 / android10/Android-CleanArchitecture-Kotlin
How to run usecases in parallel?
Aperta
discussion
question
- Lingua principale
- Kotlin
- Stelle
- 4.8k
- Fork
- 929
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.