lua-users home
lua-l archive

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


On Thu, Aug 13, 2020 at 5:44 AM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:

> So I think it's no meaning to pass such arguments(i.e. LUA_TSTRING,
> LUA_TTABLE, LUA_TFUNCTION) to it.

This lets the allocator and therefore the host track some Lua objects.
This is of particular importance for the Lua thread objects, which the
host may have to interrupt asynchronously. This seems to be the only
way to implement such interruption generically, short of modifying
Lua's source code.

Yes, this adds overhead and complexity, and a better method built into
Lua out of the box is very much desired.

Cheers,
V.