What is a scheduler?

In ReactiveX, the heart of concurrency lies in schedulers. As I have already mentioned, by default, the Observable and the chain of operators applied to it will do the work on the same thread where subscribe is called, and the thread will be blocked until Observer receives the onComplete or onError notification. We can use schedulers to change this behavior.

A scheduler can be thought of as a thread pool, from which ReactiveX can pool a thread and execute its task on it. It's basically an abstraction over multithreading and concurrency, making the implementation of concurrency a lot easier in ReactiveX.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.210.71