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

louiscad

03/03/2018, 10:12 AM
I'm starting to write a Medium article that aims to guide Android developers to use kotlinx.coroutines. I'll cover the basics to use coroutines correctly in Android apps. That includes how to use
launch
,
withContext
,
async
, the
suspend
modifier, which CoroutineContext to pick, what a
Job
is, how to wrap a callback with
suspendCoroutine
, how to handle errors, how to handle lifecycles of Android components. I'll also talk about some good libraries made on coroutines. Namely, @gildor and @jw ones for Retrofit. I'll also talk about channels and how it can be used for actors and to wrap true callback hells. Since this is my first public article, I'm unsure about the results, but I'm determined. I can share the draft to anyone willing to give feedback or willing to help in any other way. The current title of the draft article is kotlinx.coroutines intro for Android Devs. Please tell me if you dislike it or if you think you have a better one.
👍 8
d

dekans

03/03/2018, 4:26 PM
I'd like to help 🙂 I'd be curious to dig in the producer way of using coroutines too.
l

louiscad

03/03/2018, 4:58 PM
@dekans Thank you, I'll send you the link of my WIP draft by DM 😊. About the "producer way", you mean using
produce
or something else?
d

dekans

03/03/2018, 5:32 PM
yes exactly
l

louiscad

03/04/2018, 9:31 AM
I admit I didn't use it yet, because I didn't understand which use cases it fits yet, but I'm willing to learn more about it too
d

dekans

03/04/2018, 1:02 PM
Neither to me, because I haven't met the use case yet, just like you.
a

adibfara

03/05/2018, 7:30 AM
Good intent! I would be happy to review the draft.
2 Views