rx java - Will combinelatest trigger doOnUnsubscribe of its children -
not sure if combined observable delegates doonunsubscribe sources.
if not there simple way trigger unsubscribles of children?
in code:
observable o = observable.combinelatest(o1, o2);
if triggers unsubscribe of o trigger unsubscribe of o1 , o2?
not sure mean.
unsubscription propagated both o1
, o2
if want perform custom actions, have use doonunsubscribe
on relevant parties:
observable<t> o = observable.combinelatest( o1.doonunsubscribe(() -> { }), o2.doonunsubscribe(() -> { })) .doonunsubscribe(() -> { }); o.take(1).subscribe();
but note these chain-global (instead of per-subscriber) actions , second subscription/unsubscription o
may call them again. if need per-subscriber resource management, @ using
operator.
Comments
Post a Comment