exchange
Начиная с Kotlin: 2.1
fun exchange(newValue: NativePtr): NativePtr
Атомарно сохраняет заданное новое значение в этом AtomicNativePtr и возвращает старое значение.
© 2010–2026 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.concurrent.atomics/-atomic-native-ptr/exchange.html