Let's say that I have 'n' data sources (REST APIs for instance):
Observable<List<DataItem>> source1 = api.source1();
Observable<List<DataItem>> source2 = api.source2();
Observable<List<DataItem>> source3 = api.source3();
...
Observable<List<DataItem>> sourcen = api.sourcen();
where 'n' is relatively small (~10)
What I want to do is to take all those sources, run them in parallel and receive List<DataItem> list
containing all DataItems from all observables, but only when every network call is finished.
Thanks in advance
> source1 = api.source1().subscribeOn(Schedulers.newThread());` etc (from http://stackoverflow.com/questions/38234152/how-can-i-make-this-rxjava-zip-to-run-in-parallel)
– John O'Reilly Dec 10 '16 at 13:31