Brian Schlining
1 min readFeb 20, 2019

--

Hi Alex, By default, RxJava is single threaded. Observers are notified on the same thread that they subscribe on. When you convert the CompletableFuture to an Observable, the future is doing it’s processing on whatever executor you’ve assigned it to (or the default fork-join executor if you didn’t specify and executor), the observer is doing it’s work on it’s subscription thread.

If you want RxJava, to do work async, an Observable has observerOn and subscribeOn methods as well as predefined Schedulers. You can use various permutations of these for asynchronous work. There’s a bunch of really good articles about RxJava scheduling out there. Cheers!

--

--

Brian Schlining
Brian Schlining

Written by Brian Schlining

Polyglot coder. Deep-sea Researcher. Zazen aficionado. I think squids are pretty cool.

No responses yet