igor.wojda
01/13/2017, 7:12 AMObservable<List<User>> returned by first API, now each user has a method loadThumbnail() witch makes http request to other api and loads image
I tried such aproach, but it seems that images are loaded one after another (it's quite logical) and it takes to much time.
Observable<List<User>>
.flatMap { Observable.from(it)
.doOnNext {
user.loadThumbnail()
}
.toList()
}.subscribe()
Obvious solution is to load images concurently and proceed (to subscribe operator) when image loaging for all users is done.
So how can I solve this problem?
Is there any way to limit number of loaded images at a time?