Luke Rohde
10/22/2019, 2:19 PMticker, but it’s marked as obsolete and it’s unclear whymarstran
10/22/2019, 2:34 PMNote: Ticker channels are not currently integrated with structured concurrency and their api will change in the future.withoutclass
10/22/2019, 2:49 PMrepeat with delay or a coroutine with a loop that checks isActive + delaybdawg.io
10/22/2019, 3:57 PMFlow with an indefinite generator with a delay if you want it as a streamDennis Schröder
10/23/2019, 7:01 AMsuspend fun periodicTask(
period: Long,
context: CoroutineContext = EmptyCoroutineContext,
task: suspend CoroutineScope.() -> Unit
) = withContext(context) {
while (true) {
delay(period)
task()
}
}Dennis Schröder
10/23/2019, 7:06 AMuli
10/23/2019, 7:30 AM