From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CBA69469719 for ; Sat, 3 Oct 2020 20:08:26 +0300 (MSK) Date: Sat, 3 Oct 2020 19:57:51 +0300 From: Igor Munkin Message-ID: <20201003165751.GJ18920@tarantool.org> References: <20200929151946.GZ18920@tarantool.org> <0acd01d698d6$d1a23460$74e69d20$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0acd01d698d6$d1a23460$74e69d20$@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2.X 3/7] module api: luaT_newthread List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Timur Safin Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org Timur, On 02.10.20, Timur Safin wrote: > : From: Igor Munkin > : 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 > : ). 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 (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