Blocking operators
In RxJava, there is a set of operators we have not covered yet, called blocking operators. Such an operator serves as an immediate proxy between the reactive world and the stateful one, blocking and waiting for results to be emitted, and then returns in a non-reactive way. Even if the reactive operations are working on different threads, the blocking operator stops the declaring thread and makes it wait for the result in a synchronized manner, much like blockingSubscribe().
A blocking operator is especially helpful in making the results of Observable or Flowable chain processing available for evaluation. However, you should avoid using it in production because it encourages anti-patterns and undermines the benefits of reactive ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access