Hacker News new | past | comments | ask | show | jobs | submit login

you need language support for coroutines - what happens when the stack runs out in one of the coroutine? With a library solution you would have to kill the co-routine, or kill the program. If you want the stack to grow transparently, then that can only be done by the generated code, it has to watch stack usage and then grow the stack on demand (i think you have something like that with goroutines)

Well, maybe a library solution could possibly have a guard page at the end of the stack. When that one is reached, then you could try to grow the stack in an error handler. (but that would probably not work, if you have taken a pointer to some stack variable)




You don't need language support for coroutines if you have language support for relocatable/chunkable stack, which Go has.




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

Search: