Anyone have a list of all the functions that are a...
# coroutines
r
Anyone have a list of all the functions that are added for coroutines? (like async, runBlocking etc) or know where I can find it I find that it's something I'm missing when trying to learn them, to kinda answer the question "is there a better way of doing this?"
g
the only keyword is
suspend
. Async, runBlocking just function names and not even part of stdlib
r
That's why I put keyword in quotes, I mean the coroute-related functions as well
I updated my question to avoid confusion
g
language part of coroutines is very small and low level (except maybe buildSequence and buildIterator): https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines.experimental/index.html
But there is also kotlinx.coroutines which is official library from Kotlin Team that build a lot of more high level primitives and integrations on top of Kotlin coroutines, you can find full references and docs on Github page of the library: https://github.com/Kotlin/kotlinx.coroutines
r
After much digging I found this: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/ which is the closest to what I was looking for
g
Yes, this is reference of kotlinx-coroutines-core module, but there are many other: https://kotlin.github.io/kotlinx.coroutines/
But if you want to learn how to use Kotlinx.Coroutines and Coroutines in general better to read this guide first which includes examples of usage of many of those primitives and some usecases and approaches: https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md
r
That was a nice guide, thanks