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

checking for isDisposed() #70

Open
givotnoe opened this issue Apr 26, 2018 · 0 comments
Open

checking for isDisposed() #70

givotnoe opened this issue Apr 26, 2018 · 0 comments

Comments

@givotnoe
Copy link

Hi, in your presenters you create an rx-chain, subscribe to it with consumers and put the resulting Disposable into CompositeDisposable.

First question - why don't you keep a simple Disposable reference in your presenter to check if it isDisposed() on next click? The current code creates a new chain on every click, even if previous one is not terminated.

Second question - what if your rx chain will be longer and somewhere in the middle of it some source or operator will call dispose()? Your presenters deal with gui before subscription and inside Consumers, but if dispose() will be invoked somewhere in the middle, your Consumers will never get a terminal event and won't be disposed as dispose() event goes upstream, not downsteram. Also in such a scenario, Consumers won't refresh gui (termainal events won't be received). Is that case realistic?

Thanks and sorry for bad English

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