getOrPut

inline fun <K, V> AtomicMap<K, V>.getOrPut(key: K, defaultValue: () -> V): V

Atomic version of MutableMap.getOrPut. defaultValue can be evaluated multiple times if a concurrent edit occurs.