tryUpdate

abstract suspend fun tryUpdate(f: (A) -> A): Boolean(source)

Attempts to modify the current value once, in contrast to update which calls f until it succeeds.