Explicit concurrency in Kotlin
I have asked this question on stackoverflow and it turns out to be more of a language design question.
I need to write a Kotlin suspending function which does the following:
Launches a cancellable infinite operation, like collecting a flow or running a while cycle which generates flow values.
After launching the operation it does some extra suspending checks, makes sure everything is fine and returns.
The function should not suspend indefinitely while the operation is running, it should...