can anyone help me understand how atomicfu library...
# kotlin-native
w
can anyone help me understand how atomicfu library works? what does it do under the hood that allows you to mutate something wrapped with
atomic(...)
? i understand that the object in
atomic
is frozen, but its unclear to me why it can be mutated. (also what does
fu
stand for / mean?)
e
on the JVM, the plugin rewrites the output bytecode to use Atomic*FieldUpdater or VarHandle, depending on configuration; on JS, it rewrites the output JS; on native, it wraps the Atomic* types from kotlin.native.concurrent