Closed Andarist closed 6 years ago
Hi @Andarist, thanks. Did you also run existing tests? sink(0,talkback)
used to be the last operation, and then we just changed it to executed before, and now you're moving it back to be the last operation. I wonder if we're getting something wrong conceptually (overall). And wouldn't the sink(0,talkback)
be called twice?
Did you also run existing tests?
Yeah, made sure of that.
And wouldn't the sink(0,talkback) be called twice?
There is return
statement preventing double calls
I wonder if we're getting something wrong conceptually (overall).
I believe new flow reflects normal situation better - before we were greeting sink & source in some order (one after the another). Now greeting sink is embeeded into the source greet.
Sink starts the subscription and gets the talkback back literally when the source decides to give it back - it's the same situation as with non-shared sources, just with additional layer of shared
middleman. Previously sink got the talkback at arbitrary time, because it was the shared
which gave it to the sink.
Okay, now I see it, I think I missed the return
. Good that you ran the tests too (I should setup CI...).
Thanks for the PR
v1.0.2
Without this fix
share
crashes onforEach
with:After my slight tweak this better reflect how things behave when there is only a single source-sink pair in regards to when the sink gets greeted