loop

inline fun <V> AtomicRef<V>.loop(action: (V) -> Unit): Nothing(source)

Infinite loop that reads this atomic variable and performs the specified action on its value.