December 2017
Intermediate to advanced
322 pages
7h 3m
English
As an abstraction layer for thread pool management, the scheduler API provides you with some pre-composed scheduler. It also allows you to create a new user-defined scheduler. Let's take a look at the available scheduler types:
We will look into their definitions and their prescribed use-cases, but first, let's get started with some code.
We will start with a usual example without a scheduler, and then we will implement a scheduler in the same example to observe the difference, as follows:
fun main(args: Array<String>) { Observable.range(1,10) .subscribe { runBlocking { delay(200) } println("Observable1 ...Read now
Unlock full access