lua-users home
lua-l archive

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


On Wed, Mar 9, 2022 at 3:22 PM John W <jwdevel@gmail.com> wrote:
Ah, I just discovered PIL 25.2 (Hooks) and 25.4 (Sandboxing), so
perhaps debug.sethook() will be a good way to do this.

Though still interested in other solutions, if people have them.

-John

There is one detail you should be advised of. While this can be made to work, the hooks only work between operations. A single long-running operation (for example, an I/O operation or a call to a C function) does not trigger any Lua hooks and will therefore block this style of preemption.

/s/ Adam