Join Slack
Does the `Volatile` annotation do anything on Kotlin native with the new memory model. The document...
# multiplatform
m
mkrussel
01/03/2023, 10:33 PM
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
hfhbd
01/03/2023, 10:59 PM
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
mkrussel
01/03/2023, 11:04 PM
Thanks
i
ilya.gorbunov
01/10/2023, 6:32 PM
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
103
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by