lua-users home
lua-l archive

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


On Tue, Aug 30, 2016 at 7:20 AM, Daurnimator <quae@daurnimator.com> wrote:
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.