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

I mean, this is an interesting thing to think about but isn't at all what the article is about...coroutines have many uses may be and are often related to async work in general but OP is using coroutines just as a pauseable function (in good old asm, you know how computers actually just work, this is just jumping into a subroutine).


I think the article implements stackful coroutines since the yield calls a function where control flow jumps to, it eventually returns to the instruction(s) after the yield statement.

(That is, it's not a JMP)




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

Search: