diff --git a/libraries/stdlib/src/kotlin/collections/Maps.kt b/libraries/stdlib/src/kotlin/collections/Maps.kt index 674574f3e21..0e13baa3c15 100644 --- a/libraries/stdlib/src/kotlin/collections/Maps.kt +++ b/libraries/stdlib/src/kotlin/collections/Maps.kt @@ -297,6 +297,8 @@ public fun Map.getValue(key: K): V = getOrImplicitDefault(key) * Returns the value for the given key. If the key is not found in the map, calls the [defaultValue] function, * puts its result into the map under the given key and returns it. * + * Note that the operation is not guaranteed to be atomic if the map is being modified concurrently. + * * @sample samples.collections.Maps.Usage.getOrPut */ public inline fun MutableMap.getOrPut(key: K, defaultValue: () -> V): V {