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

SerialSubscription and SingleAssignementSubscription naming, Subscriptions in general #592

Closed
headinthebox opened this issue Dec 9, 2013 · 4 comments

Comments

@headinthebox
Copy link
Contributor

SerialSubscription has

private static final Subscription UNSUBSCRIBED = new Subscription() {

SingleAssignmentSubscription has

private static final Subscription SENTINEL = new Subscription() {

for the same purpose.

Also, these use lockfree implementations, the other subscriptions use locks.

Perhaps someone can go over all subscriptions and implement them in the same style and using the same naming conventions.

@akarnokd
Copy link
Member

akarnokd commented Dec 9, 2013

I have to rebase my Subscription changes anyway, so I'll do the renaming to UNSUBSCRIBED_SENTINEL.

@jloisel
Copy link
Contributor

jloisel commented Dec 9, 2013

I may help again to use lock free strategy in other subscription implementations.

@headinthebox
Copy link
Contributor Author

@akarnod

You should be able to have serialsubscription inherit from multipleassignmentsubscription. The difference is that the latter unsubscribes when swapping in a new subscription. I think that would show the intent better and make the code more maintanable.

In fact, I think MultipleAssignmentSubscription itself can inherit from BooleanSubscription.

@akarnokd
Copy link
Member

I don't know. I can create many PRs for all kinds of variants, but at the end @benjchristensen has to decide; I'd rather avoid look-and-feel development.

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

No branches or pull requests

3 participants