Getting back to Lua, Lua is based upon a VM, so it has its own concept of
RIP and RSP. A call to lua_newstate() (or luaL_newstate()) returns a new
Lua VM context, which can be likened to a "process" in that it manages the
resources and contains at least one "unit of execution." The function
lua_newthread() creates a new "unit of execution" within the current Lua VM,
which the Lua documentation calls a "thread" but is more like a "coroutine"
although in any case, it's a "unit of execution" that needs to be
explicitely switched to. And this "unit of execution" only has meaning to
the Lua VM---it is totally unrelated to the system notion of "units of
execution" (like threads or processes).