I'm using RxJava 2.x, and have 3 observables (if important, specifically publish subjects).
I like to run them all once, and get results once. I was using Observable.zip()
operator for this kind of processes. However It looks like Zip operator doesn't support more than 2 observables.
Is there other operator to combine more than 3 observables just like zip?
Observable.zip(
getData(),
getOtherData(),
getTemplate(),
(o1,o2,o3)->{
});
Actually,
It supports, I didn't return value, and IDE's error message was misleading.
Observable.zip(
getData(),
getOtherData(),
getTemplate(),
(o1,o2,o3)->{
return null;
});
There is a zip function variant that zips 3 sources.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With