Schedulers
Learn how Schedulers are used to add asynchronicity to RxJava.
We'll cover the following...
What are schedulers?
A Scheduler
is a multithreading construct introduced in RxJava that can run a scheduled unit of work on a thread. Simplistically, you can think of a Scheduler
as a thread pool, and when a task needs to be executed, it takes a single thread from its pool and runs the necessary task.
Scheduler
constructs are used in conjunction with .subscribeOn()
and .observeOn()
, two operators that specify where a particular operation should execute. When a Scheduler
is specified along the Observable
chain, the Scheduler
provides a worker that runs the actual block of ...