Ok, I think I solved this with `whileSelect`, but ...
# coroutines
Ok, I think I solved this with
, but what's the boolean that needs to be returned for? It doesn't look docuemented in the guide's examples..?
whileSelect { ... }
is a shorthand for
while(select { ... }) {}
, so the value of the boolean result is self-explanatory.
You mean it doesn't exit the loop until it's true? And select by itself returns whatever result it gets from the first onXXX that gets called? I looked through the kdocs and the guide, and I don't think I saw something talking about this, unless I missed something?
Thanks! I was looking at the guide (finally noticed that there were changes from the last time I read it... I think I'll have to go through it again...), and the onXXX functions, I hadn't realized that
itself returns those results... When Roman showed that piece, it dawned on me, especially since whileSelect isn't mentioned in the api overview, you really have to look for that page.