Scheduler Task
Hello, recently I wrote a code for a task scheduler, but I’m not entirely sure if it’s written correctly. Here’s the code:
typealias SchedulerBlock = suspend () -> Unit
interface Scheduler {
suspend fun scheduleAsync(block: SchedulerBlock)
suspend fun scheduleSync(block: SchedulerBlock)
suspend fun scheduleAsyncTask(delay: Duration, repeat: Duration?, block: SchedulerBlock)
suspend fun scheduleAsyncTask(delay: Duration, block: SchedulerBlock) = scheduleAsyncTask(delay,...