loop

inline fun <V> Atomic<V>.loop(action: (V) -> Unit): Nothing(source)
inline fun AtomicBoolean.loop(action: (Boolean) -> Unit): Nothing(source)
inline fun AtomicInt.loop(action: (Int) -> Unit): Nothing(source)
inline fun AtomicLong.loop(action: (Long) -> Unit): Nothing(source)

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