One of the more interesting things you can do here is inject a hook
that calls lua_yield.
This means your top level "lua_resume" (or lua_pcallk) will return,
and you can perform some operation before proceeding.
Does this only work from C? I have tried a naive pure-Lua thread implementation with debug.sethook(coroutine.yield,'',1) and it blew up.