I have a (probably naive) question regarding corou...
# coroutines
s
I have a (probably naive) question regarding coroutines. Since 1.3 is out and coroutines are no longer experimental, do I still need to add the kotlinx-coroutines-core bit in my gradle file if I want to write something simple like
Copy code
runBlocking {
            things.forEach {
                launch {
                    doTheThing(it)
                }
            }
        }
I wasn't sure if that was part of the base language now or not. I think I'm just a little confused about where the lines are drawn for this
r
Yes. Coroutines are part of the language, but the functions
runBlocking
,
launch
, etc. are part of the kotlinx.coroutines library, so it will need to be included to use them.
s
Okay cool. Thank you 🙂
👍 1