Hacker News new | past | comments | ask | show | jobs | submit login

Execution can be interrupted, though, through debug hooks. It could be set up to yield every N instructions. [1]

There's a few caveats, though, in that this will not be called if you've called into C code. That is, you will only yield while executing code in the Lua interpreter.

1. https://pgl.yoyo.org/luai/i/lua_sethook




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: