maxmello
09/15/2021, 8:07 AMMutableStateFlow.update { newValue }
vs. .emit(newValue)
? Basically, just to be safe regarding concurrent updates?ade
09/15/2021, 8:19 AMmaxmello
09/15/2021, 8:25 AMAlex Vanyo
09/15/2021, 3:42 PMmutableStateFlow.value = newValue
, which doesn’t suspend whereas emit
doesmaxmello
09/15/2021, 3:45 PMAlex Vanyo
09/15/2021, 3:59 PMMutableStateFlow.emit
does under the hood: https://github.com/Kotlin/kotlinx.coroutines/blob/b231887c3214187cf7f09a74073f84383a487b71/kotlinx-coroutines-core/common/src/flow/StateFlow.kt#L374-L376