pguardiola
04/08/2022, 8:21 PMCoroutines 1.7.0 will be released withoutcompanion and we are gradually stopping the support ofnative-mt
during the course ofnative-mt
lifecycle. We still are ready to accept PRs or release versions with the new Kotlin if there is a need to, but new coroutine features won't get1.6.x
support.native-mt
Casey Brooks
04/08/2022, 8:29 PMkotlin.native.binary.memoryModel=experimental
in gradle.properties
https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md#switch-to-the-new-mmpguardiola
04/08/2022, 8:35 PMmt
i'm running now into
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared <object>@a090e8 from other thread
pguardiola
04/08/2022, 8:35 PMfreeze
let me try that outpguardiola
04/08/2022, 8:36 PMpguardiola
04/08/2022, 8:49 PMpguardiola
04/08/2022, 9:05 PMandroidMain
deps? that'd be unfortunate, thought that only coroutines core was neededpguardiola
04/08/2022, 9:07 PMpguardiola
04/08/2022, 9:12 PMCasey Brooks
04/08/2022, 9:14 PMDispatchers.Main
, but that’s probably a bad idea. At some point, I’d think you’ll want to deliver results to the UI and not have to do runOnUiThread { }
. And I’m willing to bet that all of the Androidx libs that depend on coroutines depend on the Android variant, so it’s probably going to be there anyway, whether you explicitly use Dispatchers.Main
or notpguardiola
04/08/2022, 9:36 PMrunOnUiThread
, great point, thanks again!pguardiola
04/08/2022, 9:39 PMpguardiola
04/08/2022, 10:00 PM