lua-users home
lua-l archive

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


On Mon, Aug 24, 2020 at 10:50 AM Viacheslav Usov wrote:
the following code seems to achieve the same effect without coroutines

You forgot to unhook (to save and restore the original hook).
So, using a temporary coroutine does make sense here.
BTW, "error(0)" could be replaced with just "x()" :-)