Hello there, I was recently bitten by the `Mutable...
# coroutines
a
Hello there, I was recently bitten by the
MutableSharedFlow
default constructor + tryEmit issue. I was reading through the issue and seems to me that the docs added here are not 100% accurate? It seems to me that they indicate that the
tryEmit
call can succeed, but in reality it will always fail (aka not emit anything) but can return true or false depending on having subscribers or not, isn’t it? cc @elizarov Wondering if it would make sense to have a quick PR there to simplify the texting, could volunteer for that 🙂
b
It seems to me that they indicate that the
tryEmit
call can succeed, but in reality it will always fail (aka not emit anything)
No, doc clearly says tryEmit only succeeds if there are no subscribers. Basically this sections says don't use tryEmit with default configuration
a
right, so my suggestion would be to rephrase that a bit so it’s more obvious
saying it succeeds just because it emits true, when no value is emitted, can be confusing IMO