Scheduler
interface Scheduler
Schedules work in sync/async contexts.
Design note
KTale does not assume a tick loop, thread affinity, or coroutine availability. "Sync" and "async" are platform-defined concepts; a platform adapter decides what constitutes the main thread (if any), and how async is executed.
Functions
Link copied to clipboard
Runs task as soon as possible in the platform's "async" context.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun runAsyncRepeating(initialDelay: Duration, interval: Duration, task: Runnable): TaskHandle
Async variant of runSyncRepeating.
Link copied to clipboard
fun Scheduler.runAsyncRepeating(initialDelay: Duration, interval: Duration, task: () -> Unit): TaskHandle
Link copied to clipboard
Runs task as soon as possible in the platform's "sync" context.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun runSyncRepeating(initialDelay: Duration, interval: Duration, task: Runnable): TaskHandle
Link copied to clipboard
fun Scheduler.runSyncRepeating(initialDelay: Duration, interval: Duration, task: () -> Unit): TaskHandle