From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id F1D1846971A for ; Fri, 13 Dec 2019 10:58:52 +0300 (MSK) Received: by mail-lf1-f45.google.com with SMTP id f15so1228036lfl.13 for ; Thu, 12 Dec 2019 23:58:52 -0800 (PST) Date: Fri, 13 Dec 2019 10:58:50 +0300 From: Konstantin Osipov Message-ID: <20191213075850.GA21575@atlas> References: <20191210083258.GD21413@atlas> <2c8fe897-9a9d-849d-463e-5fadff982b8c@tarantool.org> <20191211070830.GA5953@atlas> <20191212084603.GA24448@atlas> <96368326-84a1-0b3c-15f8-54e3d044db85@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96368326-84a1-0b3c-15f8-54e3d044db85@tarantool.org> 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: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org * 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? > 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. > 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. > 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? -- Konstantin Osipov, Moscow, Russia