kotlin.collections.java.util.concurrent.ConcurrentMap

Extensions for java.util.concurrent.ConcurrentMap

getOrPut

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

Concurrent getOrPut, that is safe for concurrent maps.