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
I'm use rxjava version 2.1.1.
I think I found a litle bug
Every time I send object to a observers, the my subscribe never is called when I'm use flatMapInterable and toList to processe itens in my list before him.
the subscribes only called when subject.onComplete() isso called.
Please see the code.
ReplaySubject<List<Object>> subject = ReplaySubject.create();
subject.flatMapIterable(object -> {
Log.d(TAG, "flatMapIterable: it is called " + object.toString());
returnobject;
}).doOnEach(objNotification -> Log.d(TAG, "doOnEach: it is called " + objNotification.getValue().toString()))
.toList()
.subscribe(obj -> Log.d(TAG, "subscribe: it is only called after subscribe.onComplete()" + obj.toString()));
subject.onNext(getListOfObjects());
Log.d(TAG, "onComplete:");
subject.onComplete();
See the logcat
07-04 23:20:38.258 10770-10770/app.package D/TAG: flatMapIterable: it is called
07-04 23:20:38.259 10770-10770/app.package D/TAG: doOnEach: it is called
07-04 23:20:38.259 10770-10770/app.package D/TAG: onComplete:
07-04 23:20:38.260 10770-10770/app.package D/TAG: doOnEach: it is called
07-04 23:20:38.260 10770-10770/app.package D/TAG: it is only called after subscribe.onComplete()
P.S. Sorry my bad english
The text was updated successfully, but these errors were encountered:
That seems (to me at least) to be working as intended, looking at the marble diagram of toList. How would toList "know" it's supposed to emit something without a terminal event?
Maybe you could use the buffer operator, it might do what you want...
I'm use rxjava version 2.1.1.
I think I found a litle bug
Every time I send object to a observers, the my
subscribe
never is called when I'm useflatMapInterable
andtoList
to processe itens in my list before him.the subscribes only called when subject.onComplete() isso called.
Please see the code.
See the logcat
P.S. Sorry my bad english
The text was updated successfully, but these errors were encountered: