You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: