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

Cleanup function should be passed to the SubscriptionObserver #200

Open
lxsmnsyc opened this issue May 23, 2019 · 0 comments
Open

Cleanup function should be passed to the SubscriptionObserver #200

lxsmnsyc opened this issue May 23, 2019 · 0 comments

Comments

@lxsmnsyc
Copy link

an issue with how the cleanup function is defined in the SubscriberFunction is that the SubscriberFunction must return the function. This is problematic if the SubscriberFunction blocks the execution for too long until it receives the cleanup function.

In RxJava, we can solve this by replacing the internal cancellable/disposable state of the Emitter (SubscriptionObserver) by calling setDisposable(Disposable) or setCancellable(Cancellable).

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

1 participant