-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value classes don't work on native #291
Comments
However, for value classes this invocation of It's better to avoid using AtomicReference to value classes and this will be prohibited in the next versions of the plugin. Instead, in this case you may use |
Furthermore, please note that the atomicfu plugin can only perform transformations of atomic values declared as properties. It won't be able to perform transformations on atomic values declared as local variables. For example, the code below is correct:
|
How is this not a bug? |
If the plugin does not support this behavior it should at least fail at compile time instead of causing a deadlock at runtime |
This behaviour will be prohibited in the compiler plugin: KT-61584 |
The use of value classes for the Reset class has already caused issues implementing #855. However, it was isolated to native platforms. Unfortunately, this behavior will become a compiler error soon, so we need to change it. This can be achieved by simply using the backing Instant instead of Reset with AtomicRef. Related Issues: #855 #69 Kotlin/kotlinx-atomicfu#291 https://youtrack.jetbrains.com/issue/KT-61584 Co-authored-by: lukellmann <lukellmann@gmail.com>
Currently this update call never finishes
Might be fixed by #261
The text was updated successfully, but these errors were encountered: