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

Add "Subscriptions.unsubscribed" to fix the 'isUnsubscribed' issue #1950

Merged
merged 2 commits into from
Dec 13, 2014

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Dec 11, 2014

As per #1943

@@ -26,7 +26,7 @@
*/
public final class MultipleAssignmentSubscription implements Subscription {
/** The shared empty state. */
static final State EMPTY_STATE = new State(false, Subscriptions.empty());
static final State EMPTY_STATE = new State(false, Subscriptions.unsubscribed());
Copy link
Member

Choose a reason for hiding this comment

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

Why does this one start as unsubscribed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Subscriptions.unsubscribed() will be returned to the user when MultipleAssignmentSubscription is unsubscribed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was wrong. It should be Subscriptions.empty.

@benjchristensen
Copy link
Member

Looks good. Just want to understand the one question I asked.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 12, 2014

Now the static EMPTY_STATE can not be used because it becomes stateful.

benjchristensen added a commit that referenced this pull request Dec 13, 2014
Add "Subscriptions.unsubscribed" to fix the 'isUnsubscribed' issue
@benjchristensen benjchristensen merged commit ba85468 into ReactiveX:1.x Dec 13, 2014
@zsxwing zsxwing deleted the unsubscribed branch December 18, 2014 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants