putAsync

abstract suspend fun putAsync(key: String, creationFunction: suspend (C) -> Boolean): Deferred<C?>

Associates a new container serialized by creationFunction asynchronously with the given key.

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

creationFunction should return true if the creation was successful, and false otherwise.

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