Skip to content

fix(mergeAll): add source subscription to composite before actually subscribing#2479

Merged
benlesh merged 1 commit intoReactiveX:masterfrom
mpodlasin:fix-merge-all-inner-subscriptions
Jul 26, 2018
Merged

fix(mergeAll): add source subscription to composite before actually subscribing#2479
benlesh merged 1 commit intoReactiveX:masterfrom
mpodlasin:fix-merge-all-inner-subscriptions

Conversation

@mpodlasin
Copy link
Copy Markdown
Contributor

Add subscriptions for source Observables to mergeAll composite subscription before actually subscribing to any of these Observables, so that if source Observable emits synchronously and consumer of mergeAll unsubscribes at that moment (for example take operator), subscription to source is unsubscribed as well and Observable stops emitting.

Closes #2476

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.001%) to 97.69% when pulling 98ca133 on Podlas29:fix-merge-all-inner-subscriptions into 01e1343 on ReactiveX:master.

Copy link
Copy Markdown
Member

@benlesh benlesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some clarification around a comment.

() => results.push('GOOSE!')
);

// never even get here
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is confusing. Why wouldn't it get here?

@mpodlasin
Copy link
Copy Markdown
Contributor Author

@benlesh done.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 29, 2017

Coverage Status

Coverage increased (+0.2%) to 96.931% when pulling f5970bf on mpodlasin:fix-merge-all-inner-subscriptions into f9318d8 on ReactiveX:master.

…ubscribing

Add subscriptions for source Observables to mergeAll composite subscription
before actually subscribing to any of these Observables, so that if
source Observable emits synchronously and consumer of mergeAll unsubscribes
at that moment (for example `take` operator), subscription to source is
unsubscribed as well and Observable stops emitting.

Closes #2476
@cartant
Copy link
Copy Markdown
Collaborator

cartant commented Jul 7, 2018

@benlesh I've rebased and refactored this PR.

@benlesh benlesh merged commit 40852ff into ReactiveX:master Jul 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants