News for hackers. Stuff that matters.
Re:Coroutines for Go by rcme on Monday July 17, 2023 @05:06PM (#36764081)
Depends how getNext is defined.
Re:Coroutines for Go by alphazard on Monday July 17, 2023 @05:18PM (#36764260)
The only way to do control flow in getNext, consistent with how you partially defined it, is to panic. That means there is some important code wrapping the whole loop body that you left out.
Re:Coroutines for Go by zeroxfe on Monday July 17, 2023 @05:21PM (#36764294)
That doesn't make sense. `getNext()` has no ability to break out of the loop.