Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for coroutine #52

Open
Zoha131 opened this issue Nov 8, 2018 · 6 comments
Open

Support for coroutine #52

Zoha131 opened this issue Nov 8, 2018 · 6 comments
Labels
question Further information is requested

Comments

@Zoha131
Copy link

Zoha131 commented Nov 8, 2018

Is it possible to use this framework with coroutine instead of RxJava?

@zsoltk
Copy link
Contributor

zsoltk commented Nov 9, 2018

@Zoha131 not currently, but we're exploring the idea.

@lgtout
Copy link

lgtout commented Dec 16, 2018

This is an awesome implementation of unidirectional architecture. But I was very much hoping it was not built on top of RxJava. I love RxJava. But we’ve come to overuse it in Android development. This became very clear to me once I understood coroutines enough for it to be an alternative tool to RxJava, depending on the specific problem I was attempting to solve. I would be happy to contribute to migrating MVICore to coroutines.

@ShikaSD
Copy link
Contributor

ShikaSD commented Dec 17, 2018

@lgtout
There are several problems with coroutines that I found while exploring possible solutions:
First, they have only experimental support of "hot" observables (in the form of channels). This API is not stable and is a subject to change "in one of the following major releases".
Second, if we were to migrate, some common abstractions are required to prevent implementing the same things twice. Here, I am mostly talking about such interfaces as ObservableSource<T> and Consumer<T>. I could not create anything suitable, as subscribing mostly required suspending, which is a bit hard to abstract. This problem could be in my limited experience with coroutines, however.

@zsoltk zsoltk added the question Further information is requested label Jun 5, 2019
@THEAccess
Copy link

THEAccess commented Sep 8, 2019

Maybe we sould take a look at now stable Kotlin Flows.
On the other hand is fairly easy to "bridge" coroutines and observables by implementing an SuspendingActor.

@ShikaSD
Copy link
Contributor

ShikaSD commented Sep 9, 2019

@THEAccess We did already
Currently it is delayed a bit, as the idea is to go a little bit further and support multiplatform as well. See #90

@mochadwi
Copy link

Can't wait for Kotlin Flow support of this library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants