Hi, I am trying to use ktor client with kotlin native and cio engine, but when i run the application i get
Copy code
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
The code looks like this
Copy code
import io.ktor.client.*
import io.ktor.client.engine.cio.*
fun main() {
val client = HttpClient(CIO)
}
This is just a simple new instance. I think it should work but it does not 😐. Just in case it is important i am on