3 ms·
> That's literally what "stackless" implies though You could have threads with enough memory for the base levels local variables. It would mean you wouldn't ne
by thethirdone 7y ago
> That's literally what "stackless" implies though
You could have threads with enough memory for the base levels local variables. It would mean you wouldn't need global variables to keep state, but it would still be stackless as you can't pause execution within a function call.
- alksjdlaksj 7y ago>for the base levels local variables. what does that even mean? Sure you could calculate what stacksize your exact programm would need at maximum, if you unroll everything, but you could not define a fixed "base level" of a stacksize for every single programm out there, could you?
- masklinn 7y ago> what does that even mean? The topmost stack frame. That's what "stackless" generally implies: it doesn't preserve the stack itself, that doesn't mean it preserves nothing. That's what you see with most async/await systems (as opposed to more integrated "lightweight thread" systems like Erlang or Go), yield points blow the stack (though it may be relinked for debugging purposes), but they don't break local variables.