[Tarantool-patches] [PATCH 2.X 3/7] module api: luaT_newthread

Igor Munkin imun at tarantool.org
Sat Oct 3 19:57:51 MSK 2020


Timur,

On 02.10.20, Timur Safin wrote:
> : From: Igor Munkin <imun at tarantool.org>
> : Subject: Re: [Tarantool-patches] [PATCH 2.X 3/7] module api:
> : luaT_newthread
> : 
> : Timur,
> : 
> : Thanks for the patch, but I guess this one can be implemented using the
> : existing public interfaces (i.e. Lua C standart API + already exported
> : <luaT_call>). It was done to resolve the issue with Tarantool internal
> : crash[1] and I believe if user need to handle OOM error it can do it by
> : himself.
> : 
> : [1]: https://github.com/tarantool/tarantool/issues/4556
> : 
> : --
> : Best regards,
> : IM
> 
> I do not quite get your point here - here we do want to use that newly
> introduced wrapper luaT_newthread in the external module. Do you suggest
> we reimplement it similarly in the external module? We tried and incr_top()
> was the problematic if we live outside of Tarantool core.
> Or do you mean that we do not want to deal with incr_top(L) from outside?

You literally was around to this function, so you can look again: it has
no LuaJIT internals at all. Once more: this helper can be implemented
via public Lua C standard API (provided by lua.h/lauxlib.h) and
<luaT_call> (provided by module.h). Just borrow the implementation from
lua/utils.c, this is about 40loc with verbose comments -- that's all.

> 
> 
> Timur
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list