That fails with this error when clicking the button:
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
at ThrowIncorrectDereferenceException (0x232c5c)
at kfun:example.$<bridge-UNNN>main$lambda-2$<anonymous>_3_6$<anonymous>_5_8(kotlin.Unit)#internal (0x2485c0)
at _ZN6Worker19processQueueElementEb (0x25d2ac)
at _ZN12_GLOBAL__N_113workerRoutineEPv (0x25d96d)
at (0x7f70ac741422)
at clone (0x7f70ac656bf3)
at ((nil))
I'm trying to run a background task using a worker and display a message when an exception is caught.
Here's a minimal reproducible example:
That fails with this error when clicking the button:
Linux x86_64
1.3.72
0.1.7
1.3.5-native-mt