"If only there
was something like that" sounds snarky to me and doesn't answer the
question at all.
You are right about that but honestly it is irresistible for me to go for the obvious punchline :)
For those that don't know, I am referring to "callbacks."
I want to straight adapt it into coroutines as much as possible.
Conditional variables are an anti-pattern in asynchronous code, because the wait state ties up the calling thread.
Thanks