Multiplatform multithreading problem

Hi, i have a block of code in kotlin which is in one thread. What I try to do is to run that thread from swift. There is a field runnable in the companion object Freezer and @ThreadLocal annotation, but when i call it from swift i get this error : Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared entities.Freezer@81921d28 from other thread. Does any body have any idea how can i do it?