I've been trying to run tasks in a Kotlin-Multiplatform lib on a background thread on the iOS project and ran into some problems:
I tried using both Kotlin-Coroutines and the platform libs for GCD and have only been able to run tasks in the the main thread in iOS. Whenever I try sending something asynchronously to a background thread, the iOS app crashes with the following error:
"kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared com.hp.jarvis.kmm.LogFile.$saveLog$lambda-0$FUNCTION_REFERENCE$9@155a948 from other thread"