RxJava: flatMap(Observable::from).toList() never completes
Hi,
as said in the subject, when using these operators together (like, for example, when filtering elements in the list), onNext
events are sent for each item of the list to the toList(), but onCompleted
is never sent, and so toList() never emits the list.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (8 by maintainers)
Call filter and toList inside the flatMap
On Sat, Apr 16, 2016, 5:15 PM Sasa Sekulic notifications@github.com wrote:
It depends on what source and operators do your function return for
flatMap
and otherwise where the whole setup runs. If there is a chance it might flatMap on the main thread but you want to make sure the 3 filters run off of the main thread, then you may usesubscribeOn
/observeOn
.ah, haven’t thought about that. 😊 thx!