kotlin-hands-on/kmp-networking-and-data-storage

Question about Coroutine dependency

ArcherEmiya05 opened this issue · 4 comments

Good day, I just wanted to ask why we use org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0-native-mt instead of the regular org.jetbrains.kotlinx:kotlinx-coroutines-android:$version here. Is there any specific reason or is it mandatory when working with KMM?

Thanks

Hi! Quoting John's reply from this StackOverflow question:

It basically provides capability to use multiple threads in Kotlin/Native code (typically as part of a Kotlin Multiplatform (KMP) project). Some more info at https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines. This is also version used now by many KMP libraries (e.g. Ktor) and is generally a requirement when developing KMP apps.

Hi! Quoting John's reply from this StackOverflow question:

It basically provides capability to use multiple threads in Kotlin/Native code (typically as part of a Kotlin Multiplatform (KMP) project). Some more info at https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines. This is also version used now by many KMP libraries (e.g. Ktor) and is generally a requirement when developing KMP apps.

Thanks a lot

Hi! Quoting John's reply from this StackOverflow question:

It basically provides capability to use multiple threads in Kotlin/Native code (typically as part of a Kotlin Multiplatform (KMP) project). Some more info at https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines. This is also version used now by many KMP libraries (e.g. Ktor) and is generally a requirement when developing KMP apps.

I just want to follow up, since native-mt is going decommission based on this thread. Is it okay to use the regular one as the replacement?

According to this comment, it's no longer required with the new Memory Model for Kotlin/Native, so yes, the replacement would be the regular version.