Closed bbarker closed 6 years ago
@OlivierBlanvillain One thing I want to point out in the test is this line:
assert(count == 6) //FIXME: should be 4?
This seems wrong to me.
Once we get this all fixed up, rather than merging directly, I can squish commits and open a new PR.
Oh, it appears the extra 2 come from the calls to impure.value
LGTM :+1: Thanks for the PR! (No need to squash, the history makes perfect sense here :smile:)
I like both suggestions mentioned for sharing in #70 , but since the second largely depends on the first, I thought I'd try to get the ball rolling with the first. Unfortunately, updating upstream var doesn't propagate. When
run
operates onSharing
, theforeach
(self.impure.foreach{ x => ...
) doesn't seem to execute for updated values of the upstream Rx, i.e.,self
. I assume this is because I've made an egregious logic error, or perhaps more specifically, sharingCancelable is cancelled before it should be.I'm also not sure if I needed to add those three sharing members to the Rx, but it seems like they needed to be persisted to the Rx.