ConcurrentCache

expect class ConcurrentCache<K : Any, V : Any>

A map that associates each key with at most one value, safe under the platform's concurrency model: concurrent getOrPut calls for the same key always return the same instance, making it safe to store mutable values.

actual class ConcurrentCache<K : Any, V : Any>

Constructors

Link copied to clipboard
expect constructor()
constructor()

Functions

Link copied to clipboard
expect fun getOrPut(key: K, compute: () -> V): V
actual fun getOrPut(key: K, compute: () -> V): V