Hi folks, `MutableStateFlow` interface documentati...
# coroutines
m
Hi folks,
MutableStateFlow
interface documentation says:
Copy code
A mutable [StateFlow] that provides a setter for [value] and a method to [close] the flow.
However, I can’t see any
close
method! I am missing something ?
o
No, I don't think you are -- you should file an issue
s
It doesn't need a close. It is still a
Flow
which don't need a close either. The lifecycle of the Flow (and MutableStateFlow) is determined by the collector (the CoroutineScope in which
collect
is called)
o
well, then the documentation should be updated to reflect that fact -- either way an issue needs to be filed
s
Ah yup, the doc needs to change.
m
Thanks for your responses. I filed an issue for it: https://github.com/Kotlin/kotlinx.coroutines/issues/2007
e
Thanks! That’s a leftover from the draft PR.
👍🏼 2