I'm using ticker function to create a repeating ta...
# coroutines
o
I'm using ticker function to create a repeating task which repeats after 1 min. I have the receive part of the code done. But the problem is in the apply part. Where do I sent the function which calls the apply code of the ticker? The ticker itself is running inside a while loop.
Copy code
val tickUpdater = ticker(60,0)
while(true) {
   // do something
   withTImeoutOrNull(60) { tickUpdater.receive() }
}
Where do I apply this function
Copy code
suspend fun updateTickList() {
   tickUpdater.apply {
       // do something
   }
}
d
Haven't used it yet, but maybe
tickerUpdater.consumeEach { updateSomething() }
?