lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Aug 20, 2019, at 9:23 AM, Philippe Verdy <verdy_p@wanadoo.fr> wrote:

Actually the "long jump" does NOT destroy the call stack: it goes to some piece of code that will save the call stack state, before foing to another suitable and runnnable coroutine for which it will restore its call stack.


Apologies, I should have been more precise. What I meant by “destroy” was that a C long jump discards the C stack frames for any C functions called after the context used for the long jump. I was not referring to the Lua stack, which of course is managed outside of the C setjmp/longjmp mechanism.

—Tim