SchedulerProvider

class SchedulerProvider(val io: Scheduler, val computation: Scheduler, val ui: Scheduler)

A wrapper class for common Rx schedulers. An instance of this can be injected to classes which are concerned about executing code on different threads, but they don't need to know about the underlying implementation. A single-threaded version for example can be injected for testing.

Constructors

Link copied to clipboard
fun SchedulerProvider(io: Scheduler, computation: Scheduler, ui: Scheduler)

Properties

Link copied to clipboard
val computation: Scheduler

Scheduler for computational work

Link copied to clipboard
val io: Scheduler

Scheduler for IO-bound work

Link copied to clipboard
val ui: Scheduler

Scheduler for UI work