The docs on `MutableSharedFlow` are unclear, and I...
# coroutines
z
The docs on
MutableSharedFlow
are unclear, and I haven’t had enough coffee this morning to figure it out from looking at the code: if there’s no buffer and no replay, is there any difference between
DROP_OLDEST
and
DROP_LATEST
? I don’t think there should be, since if there’s no buffer, and no subscriber waiting for a value at the time of emission, the only thing to do is drop the value and there’s no concept of the “oldest” or “latest” value, just “the value trying to be emitted”.
p
there’s
IllegalArgumentException
thrown for both
DROP_OLDEST
 and 
DROP_LATEST
Copy code
require(replay > 0 || extraBufferCapacity > 0 || onBufferOverflow == BufferOverflow.SUSPEND) {
    "replay or extraBufferCapacity must be positive with non-default onBufferOverflow strategy $onBufferOverflow"
}
z
Yep, need more coffee. Thanks
I think the docs could be more clear though, I’ll post a PR to try to clarify