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
bezrukov
02/01/2022, 6:26 PM
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
aballano
02/01/2022, 6:27 PM
right, so my suggestion would be to rephrase that a bit so it’s more obvious
aballano
02/01/2022, 6:28 PM
saying it succeeds just because it emits true, when no value is emitted, can be confusing IMO