Scheduler

interface Scheduler

Base interface for schedulers.

The following schedulers are provided by the library:

Types

Link copied to clipboard
interface Executor : Disposable

Base interface for Scheduler executors. All tasks are executed synchronously one by one, never concurrently. Executors must be disposed when they are no longer needed.

Functions

Link copied to clipboard
abstract fun destroy()

Destroys the scheduler

Link copied to clipboard

Creates a new instance of Executor. Throws an exception if Scheduler is destroyed.

Link copied to clipboard
fun Scheduler.submit(delay: Duration = Duration.ZERO, period: Duration = Duration.INFINITE, task: () -> Unit): Disposable