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

Given the semantics of coroutines, what would you consider a sane call stack? Should each routine have its own stack?

This is not a glib question, I genuinely don't know what the proper answer might be. Perhaps what's needed is a different debugger mechanism?



My own implementation of coroutines for C [1] requires each coroutine to have its own stack. It simplifies things quite a bit.

[1] https://github.com/spc476/C-Coroutines [2]

[2] More of a "proof-of-concept" than something really meant for production.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: