There is a bug in Kotlin/Native that leads to unnecessary unboxing-boxing of large primitives with inline functions. As a result, getAndChange, changeAndGet and change function may stuck. This happens because AtomicReference compares by reference, and the references are different. The workaround is to specify variable types as Any? and use unsafe cast which prevents unboxing-boxing.
There is a bug in Kotlin/Native that leads to unnecessary unboxing-boxing of large primitives with inline functions. As a result,
getAndChange
,changeAndGet
andchange
function may stuck. This happens becauseAtomicReference
compares by reference, and the references are different. The workaround is to specify variable types asAny?
and use unsafe cast which prevents unboxing-boxing.