https://kotlinlang.org logo
#coroutines
Title
# coroutines
e

elizarov

08/10/2017, 7:38 AM
@anthonyeef If you are using
kotlinx.coroutines
library, then its
async
function returns a
Deferred
object that represent the future result of this asynchronous operation: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/async.html
a

anthonyeef

08/10/2017, 7:39 AM
em… guess there should be more words coming?
yeah I got it. Another question is how could I manage the sequence of multi coroutines? Seems dificult to handle. Is there function like Rx
onNext()
onComplete()
method?
e

elizarov

08/10/2017, 7:45 AM
There are channels for that. You shall start with this section of the guide: https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md#channels
a

anthonyeef

08/10/2017, 7:46 AM
thx! I think this is the part I miss 😍
I am a bit confused. I dont have rx related dependencies in my project, with the link you show above, do I still need to add some extra denpendencies from rx-java ? or just use kotlin coroutines is fine enough?
e

elizarov

08/10/2017, 8:33 AM
You can use coroutines either with or without rx