What is the proper way to use Flow to run tasks fo...
# getting-started
What is the proper way to use Flow to run tasks for a given amount of time while also utilizing rate limiting? I have the following:
Copy code
runBlocking {
    withTimeoutOrNull(1000) {
            .map { executeInput(it) }

val rateLimiter = RateLimiter.of(

 * @see <a href="<https://stackoverflow.com/questions/48007311/how-do-i-infinitely-repeat-a-sequence-in-kotlin>">Infinite Sequence</a>
private fun <T> Sequence<T>.repeat() = sequence { while (true) yieldAll(this@repeat) }
Here I’m attempting to turn a list of inputs into an infinite sequence that I can then throttle with a RateLimiter + time out after a certain duration, but neither seem to be working.
Going off the example from the Resilience4J docs here: https://resilience4j.readme.io/docs/getting-started-4#usage---flow