-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Ensuring Runnables posted with delay to a Handler are removed when unsub... #1321
Conversation
…subscribed. This patch ensures the delayed runnables posted to a Handler are properly removed when Subscription.unsubscribe() is called on the Observable. The original code returns the subscription from schedule() but is not used by the callers who instead add the Worker itself as a subsciption. Signed-off-by: David Marques <[email protected]>
Thanks @dpsm for the contribution and fixes. |
RxJava-pull-requests #1213 SUCCESS |
Generally, the entire
You need to introduce a new class similar to |
…iour. Signed-off-by: David Marques <[email protected]>
RxJava-pull-requests #1214 SUCCESS |
|
||
}); | ||
})); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add the scheduledAction to the composite:
mCompositeSubscription.add(scheduledAction);
…ubscribe. Signed-off-by: David Marques <[email protected]>
RxJava-pull-requests #1221 SUCCESS |
The changes are now fine with me. @zsxwing ? |
LGTM |
@mttkay Are you okay with these changes and their impact on Android? |
@@ -58,35 +61,29 @@ public InnerHandlerThreadScheduler(Handler handler) { | |||
|
|||
@Override | |||
public void unsubscribe() { | |||
innerSubscription.unsubscribe(); | |||
mCompositeSubscription.unsubscribe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think RxJava uses the Android code style anywhere. We shouldn't adopt it here.
…ports. Signed-off-by: David Marques <[email protected]>
RxJava-pull-requests #1241 SUCCESS |
👍 |
@benjchristensen given everyone's approval when could we get it into master? I am new to the project and want to contribute a lot more specially in the android side of things! Is there anywhere I can read about the roadmap or some idea on release process, SNAPSHOT builds, etc? Thanks! |
Ensuring Runnables posted with delay to a Handler are removed when unsub...
You can read about the roadmap here: #1001 The plan is to split RxAndroid out into it's own top-level project at http://github.com/ReactiveX/RxAndroid in the next month or two. |
...scribed.
This patch ensures the delayed runnables posted to a Handler are properly
removed when Subscription.unsubscribe() is called on the Observable.
The original code returns the subscription from schedule() but is not used
by the callers who instead add the Worker itself as a subsciption.
Signed-off-by: David Marques [email protected]