lua-users home
lua-l archive

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


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