fun <T> MutableSharedFlow(
    replay: Int = 0,
    extraBufferCapacity: Int = 0,
    onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND
): MutableSharedFlow<T>

Creates a MutableSharedFlow with the given configuration parameters.

This function throws IllegalArgumentException on unsupported values of parameters or combinations thereof.


replay - the number of values replayed to new subscribers (cannot be negative, defaults to zero).

extraBufferCapacity - the number of values buffered in addition to replay. emit does not suspend while there is a buffer space remaining (optional, cannot be negative, defaults to zero).

onBufferOverflow - configures an action on buffer overflow (optional, defaults to suspending attempts to emit a value, supported only when replay > 0 or extraBufferCapacity > 0).