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

RxScala: Add convenience method for adding unsubscription callback #1300

Closed

Conversation

jbripley
Copy link
Contributor

Implements enhancement detailed in #1258

@jbripley jbripley changed the title Add convenience method for adding unsubscription callback RxScala: Add convenience method for adding unsubscription callback May 31, 2014
@cloudbees-pull-request-builder

RxJava-pull-requests #1198 SUCCESS
This pull request looks good

* @param unsubscriptionCallback callback to run when unsubscribed
*/
final def add(unsubscriptionCallback: => Unit): Unit = {
asJavaSubscriber.add(new rx.Subscription {
Copy link
Member

Choose a reason for hiding this comment

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

unsubscriptionCallback is not a good name in Rx. s should be enough. And why not use add(Subscription(s))? The codes here are almost same as Subscription.apply(u: => Unit).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, totally missed apply(). I'll change parameter to u instead and use Subscription.apply.

@cloudbees-pull-request-builder

RxJava-pull-requests #1199 SUCCESS
This pull request looks good

@jbripley jbripley closed this May 31, 2014
@jbripley jbripley deleted the subscription-block-expression branch May 31, 2014 16:03
@jbripley jbripley restored the subscription-block-expression branch May 31, 2014 16:04
@jbripley jbripley deleted the subscription-block-expression branch May 31, 2014 16:05
@cloudbees-pull-request-builder

RxJava-pull-requests #1200 SUCCESS
This pull request looks good

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.

3 participants