Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoryStream does not multicast properly, repeatedly triggers upstream calls #93

Closed
ntilwalli opened this issue Jul 26, 2016 · 2 comments

Comments

@ntilwalli
Copy link

ntilwalli commented Jul 26, 2016

Since it's automatically hot, I expect a MemoryStream to allow multicasting without re-triggering the upstream closure chain like a cold stream would, but that's not the behavior I am seeing. Using v5.3.2 the upstream chain seems to be called for each downstream listener: http://www.webpackbin.com/NykQCF-_-

When testing with Rx 4 and shareReplay, I get the behavior I would expect: http://www.webpackbin.com/41l_Yaxu-

Isn't remember() supposed to be equivalent of shareReplay(1)?

@ntilwalli
Copy link
Author

@xgrommx posted that xstream has the same behavior as Rx 5: http://www.webpackbin.com/4ku5pag_-

staltz added a commit that referenced this issue Oct 24, 2016
This fusion puts two consecutive map operators together, disguised as one map operation. This fusion
caused undesired issues such as #98, #108, #93. It works in most.js because that one is
unicast-first, but map+map fusion does not work well with multicast-only, like in xstream.

BREAKING CHANGE:
This change will remove map+map fusions. Your application code may or
may not rely on the bugs that map+map fusion caused, so we advise to
update carefully, testing your application code as you go. Generally
this is very straightforward and safe to update, as there are no visible
API changes.

Closes #98, #108, #93.
@staltz
Copy link
Owner

staltz commented Oct 24, 2016

Fixed in v7.0

@staltz staltz closed this as completed Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants