Should <https://kotlinlang.org/docs/shared-mutable...
# coroutines
r
Should https://kotlinlang.org/docs/shared-mutable-state-and-concurrency.html be updated to include a
MutableStateFlow
option with
update
?
Copy code
var counter = MutableStateFlow<Int>(0)

fun main() = runBlocking {
    massiveRun {
        counter.update { it + 1 }
    }
    println("Counter = ${counter.value}")
}
👍 1