has anyone used channels? this example shows const...
# multiplatform
k
has anyone used channels? this example shows constructing a
Channel
https://github.com/kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/test/guide/example-channel-01.kt, but
Channel
is an interface
d
Channel
is also a function to make channels
k
just saw that 🙂
for some reason it doesn't seem to be working from my common code, though
d
Not working?
k
yes, that source set can't see anything in kotlinx.coroutines.channels
d
Enable metadata?
k
i feel like there is an iOS specific dependency that I am missing
d
Does
kotlin.coroutines
resolve at all?
k
and JVM
d
I think you need to explicitly add coroutines dependency to each source set.
k
oh, the package is
kotlinx-coroutines-core-common
☝🏼 1
i was using
Copy code
kotlinx-coroutines-core
now we're cooking
common gets core-common, JVM gets core, and native gets core-native
k
got my channel, now I am missing
runBlocking
😱
k
Doesn’t exist in common. You can expect/actual to jvm and native
k
oh, so it's in native, but not in common?
interesting... i guess maybe because it's not in JS or something?
k
Yeah. My understanding is the JS situation
k
gotcha