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 CompositeSubscription #42

Closed
wants to merge 7 commits into from
Closed

Conversation

StrangePan
Copy link
Contributor

Add CompositeSubscription, a helper class for managing multiple Subscriptions and easily unsubscribing them all.

This is based on CompositeSubscription from RxJava 1. Its addition is not strictly necessary, but I've found it to be quite helpful in my own applications and figured others might find it useful as well. It's up to the maintainers to decide whether or not this is an appropriate addition to RxLua.

This pull request also moves subscription.lua and compositesubscription.lua to a new src/subscriptions subdirectory. I was unsure whether or not it was appropriate to put CompositeSubscription in the root src directory or if it should live in a specialized subdirectory like schedulers, subjects, and operators do.

@StrangePan StrangePan changed the title Compsub Add CompositeSubscription May 15, 2019
@StrangePan
Copy link
Contributor Author

StrangePan commented Apr 5, 2020

Note: my attempt to fix issue-22 currently utilizes the code in this PR. Managing multiple related subscriptions is tricky, and this helps a lot.

@4O4
Copy link
Contributor

4O4 commented Oct 18, 2020

Hi, I don't know if you're still interested in this, but I'm now maintaining my own fork of this library and actually it does have a built-in mechanism for creation of compose composite subscriptions like in RxJS directly via Subscription:add API. For more info you check out this comment: #22 (comment)

@StrangePan StrangePan closed this Oct 9, 2024
@StrangePan StrangePan deleted the compsub branch October 9, 2024 15:11
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