Skip to content

hello. need some help #66

Answered by arkivanov
MansonLuo asked this question in Q&A
Sep 15, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

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 Bootstrapper instead, and emit Actions to the executor so it could do the rest of the job. Actions could be Action.HandleTokenActive(token) and Action.HandleFreeUserActive(boolean), or any other names you like.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MansonLuo
Comment options

Answer selected by MansonLuo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #64 on September 15, 2022 11:11.