Does the `Volatile` annotation do anything on Kotl...
# multiplatform
m
Does the
Volatile
annotation do anything on Kotlin native with the new memory model. The documentation for it says it makes the JVM backing field volatile.
h
Nope, it is ignored on other targets than JVM but there is a ticket to support it on Kotlin/native: https://youtrack.jetbrains.com/issue/KT-54944/Volatile-support-in-native
m
Thanks
i
In Kotlin 1.9, there is going to be a new multiplatform kotlin.concurrent.Volatile annotation that will work similarly in JVM and Native: https://youtrack.jetbrains.com/issue/KT-55268/Mutiplatform-Volatile-annotation
104 Views