The idiomatic way to use atomic operations in Kotlin.