-
hi, i encount some serous problem that i struggle for several days. I use MVIkotlin, its version is 2.0.4 there is a SuspendExecutor, following is my own source. my problem is i cant execute both collect meantime, everytime only the first collect is executed. i need to check what method the user choose to use my app, login as account or just visit, so i need to check these in executeAction im not sure whether you can understand what i say, thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
the settings obj is from multiplatform-settings library, |
Beta Was this translation helpful? Give feedback.
-
In version 2.x you can run parallel coroutines in the following way: override suspend fun executeAction(...) {
coroutineScope {
launch { /* First thing here */ }
launch { /* Second thing here */ }
}
} Also, it looks like you are just subscribing to external sources. It might be better to do in the |
Beta Was this translation helpful? Give feedback.
In version 2.x you can run parallel coroutines in the following way:
Also, it looks like you are just subscribing to external sources. It might be better to do in the
Bootstrapper
instead, and emitActions
to the executor so it could do the rest of the job. Actions could beAction.HandleTokenActive(token)
andAction.HandleFreeUserActive(boolean)
, or any other names you like.