lua-users home
lua-l archive

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


Thanks a lot everyone. I will try out the text replacement pattern and the debug hook options :)

On Tue, Jun 18, 2019 at 1:58 PM Thomas Jericke <tjericke@indel.ch> wrote:
Am 17.06.2019 um 13:19 schrieb Abhijit Nandy:

Is there anyway to do this at regular intervals in Lua code that's certain not to break syntax?


You can yield form a counthook. Just make sure to check if you actually can yield by calling lua_isyieldable or coroutine.isyieldable first. There are some situation where Lua can't yield.

--

Thomas