A mutable SharedFlow that provides functions to emit values to the flow. An instance of
MutableSharedFlow with the given configuration parameters can be created using
MutableSharedFlow(...) constructor function.
See the SharedFlow documentation for details on shared flows.
All methods of shared flow are thread-safe and can be safely invoked from concurrent coroutines without external synchronization.
Not stable for inheritance
MutableSharedFlow interface is not stable for inheritance in 3rd party libraries, as new methods might be added to this interface in the future, but is stable for use. Use the
MutableSharedFlow(...) constructor function to create an implementation.
Resets the replayCache of this shared flow to an empty state. New subscribers will be receiving only the values that were emitted after this call, while old subscribers will still be receiving previously buffered values. To reset a shared flow to an initial value, emit the value after this call.