I have a lot of network call which emits different types e.g. string, int and so on.
I'm trying to make them parallel.
In the official rxjava doc we can read:
Flowable.range(1, 10)
.parallel()
.runOn(Schedulers.computation())
.map(v -> v * v)
.sequential()
.blockingSubscribe(System.out::println);
This example is easy, because we have all types as Int. But how to do it if we have different types e.g. string, boolean, Int ?
- every call from this 5 is independent
- group of this 5 calls will be in one method, and this method will be invoked by other random method.
- we can assume, the result of 5 calls, will be a type of first call ->
string