Schedulers.single()

The Schedulers.single() provides us with a scheduler that contains only one thread and returns the single instance for every call. Confused? Let's make it clear. Think of a situation where you need to execute tasks that are strongly sequential—Schedulers.single() is the best available option for you here. As it provides you with only one thread, every task that you enqueue here is bound to be executed sequentially.

Get Reactive Programming in Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.