[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tracking LUA_TTHREAD in allocators
- From: Viacheslav Usov <via.usov@...>
- Date: Thu, 13 Aug 2020 17:32:10 +0200
On Thu, Aug 13, 2020 at 5:44 AM 孙世龙 sunshilong <email@example.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.