putAsync

open suspend override fun putAsync(key: K, creationFunction: suspend (key: K) -> V?): Deferred<V?>

Associates a new value created by creationFunction asynchronously with the given key.

Any unhandled exceptions inside the creation block will be thrown. Existing or under-creation values associated with key will be replaced by the new value.

creationFunction should return null only if the creation fails.

Returns: a Deferred that will complete with the new value if the creation was successful, or null otherwise.