Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think there are at least two degrees of freedom being discussed here, though I'm quite unsure, so someone please correct me if I'm wrong:

- What happens when MyCoroutine() is invoked (as an ordinary function invocation - no await etc.): does execution of the body start right then, or do you just get some sort of awaitable object that can be used to start it later?

- What happens when the result of said invocation is awaited (using your language's await operator plus any extra function calls needed to begin execution): is there a forced yield to the scheduler at any point here, or do you directly start executing the body?

The article seems to be treating the two as an indivisible pair, and thus discussing the behavior merely before and after the pair as a whole, but your link seems to be discussing the first?

Again, I'm quite unsure, so curious if anyone has thoughts.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: