From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [217.69.128.36]) (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 A264446971A for ; Sat, 14 Dec 2019 02:11:56 +0300 (MSK) References: <20191210083258.GD21413@atlas> <2c8fe897-9a9d-849d-463e-5fadff982b8c@tarantool.org> <20191211070830.GA5953@atlas> <20191212084603.GA24448@atlas> <96368326-84a1-0b3c-15f8-54e3d044db85@tarantool.org> <20191213075850.GA21575@atlas> From: Vladislav Shpilevoy Message-ID: <60d9ec76-50be-ecae-175c-520975c928f9@tarantool.org> Date: Sat, 14 Dec 2019 00:11:54 +0100 MIME-Version: 1.0 In-Reply-To: <20191213075850.GA21575@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 2/2] fiber: destroy fiber.storage created by iproto List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov , tarantool-patches@dev.tarantool.org On 13/12/2019 08:58, Konstantin Osipov wrote: > * Vladislav Shpilevoy [19/12/13 09:42]: >>> Can you move it to Lua fiber object and iproto_msg object? >> >> I am not sure I understand what you mean. I can't move lua fiber >> storage destructor to iproto. I need Lua for that. So this should >> be in Lua folder. > > I mean struct rlist on_request_end should be a member of > iproto_msg, not struct fiber. Does it make sense? > >> If you are talking about moving trigger list to iproto and Lua, >> and somehow saying pointer at that list to a member in struct >> fiber, then > > No, why do you need to store the list in struct fiber? > Because the only thing which is available in lua/fiber.c is the fiber object. >> 1) I would need to patch C version too, because we have public >> C API. The fact you forgot about C API says, that it is not >> a good idea to make that cleanup in each front end. Easy to >> miss something; > > C api will enter into Lua land (lbox_pushfiber) as soon as it > creates a Lua fiber, and the Lua land will call the trigger in > the end of lbox_fiber_run_f. lbox_fiber_run_f is not called for C fibers. This is for Lua born fibers only. To invoke a C function Lua is not used. >> 2) That will give exactly the same - a member in struct fiber. >> There just no other communication channel between different >> frontends in which a fiber may participate during lifetime; > > Why do you think there will be different frontends involved? The > storage is pure-Lua, there is no fiber storage for non-Lua fibers. > Because other frontends will appear. >> 3) We would need to add a new member to struct fiber and >> increase its size. > > Please see above, do you get the idea now? > > No. I don't understand what you want and how.