-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(MemoryStream): fix a leaking execution bug
Instead of MemoryStream._add using super._add, we reimplement MemoryStream._add with custom logic. Now it's guaranteed that it will add the listener to the listeners array before emitting the remembered value. This way, if the listener is an operator like take() which can synchronously stop and remove itself from the source, we guarantee that effective _add happens before effective _remove. Previously, we had effective _add happen after effective _remove, causing a stream execution to remain even though the listener would never be removed. BREAKING CHANGE: This is generally safe to update, but note that the behavior around MemoryStream, startWith, take, imitate etc may have slightly changed, so it is recommended to run tests on your application and see if it is working, in case your application code was relying on buggy behavior. Closes #53
- Loading branch information
Showing
2 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters