“might behave unexpectedly”
For this program reliability and stability is much more important than performance.
“have a single coroutine doing the actual suspention and launch new coroutines from it when it is time”
Now I got what you mean. I will think about this idea but my intuition tells me that it won’t be possible. Because the coroutine would need to suspend multiple (let me call it) “tasks” in parallel during runtime (even the actual time to delay/suspend for each coroutine will only be known at runtime), and the they I solve patalel problems is… creating new coroutines.
“delay with a lot of coroutines”
I was more concerned about the large time of the delay than the amount of coroutines which use it.
But thank you, I think now thinks will work the way I had planned.
“the lambda of your coroutine”
Means everything inside of the launch(){} block, right?
“if it uses some other external variables”
No thinking more about how I will do it, even the object will be created inside of the launch block if I’m correct.