Aleksey Chugaev
12/13/2019, 9:48 PMnewSingleThreadContext
in iosMain
• I have built https://github.com/Kotlin/kotlinx.coroutines/tree/native-mt and installed it locally
• added kotlin.mpp.enableGranularSourceSetsMetadata=true
to gradle.properties
• commonMain depends on implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.2-native-mt-SNAPSHOT"
• iosMain depends on implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.2-native-mt-SNAPSHOT"
• using kotlin 1.3.61
Am I missing something?
P.S. I have also tried to build https://github.com/kpgalligan/MTCoroutines locally and it worked.kpgalligan
12/13/2019, 10:10 PMnewSingleThreadContext
isn’t available in common code. I think, anyway. You’d need to expect/actual.Aleksey Chugaev
12/13/2019, 10:12 PMimport kotlinx.coroutines.newSingleThreadContext
@SharedImmutable
actual val workerDispatcher: CoroutineDispatcher = newSingleThreadContext("mr background")
I have copied it to my project but cannot resolve kotlinx.coroutines.newSingleThreadContext
kpgalligan
12/13/2019, 10:13 PMmavenLocal()
in the repos list?Aleksey Chugaev
12/13/2019, 10:15 PMkpgalligan
12/13/2019, 10:16 PMAleksey Chugaev
12/13/2019, 10:36 PM