From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 918A76F87A; Wed, 28 Apr 2021 18:34:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 918A76F87A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619624087; bh=VDp0H2Cqx14bJinG2pV1Q/ia6RDENi7gOzrYkEvBtC4=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qCoHpVHgwFo1dnTzfWtKRNodLv8PZOVYF8Ihhvb0QHKnUPrcS5g5n7tNNNj7GZ73Y 6XoEBD2KxdJocB+Mdt1sE6oTjkxKyvp/Btqp+1VwrFNSwftl1TLktFE9m9q9ZSdPHa 2f3ImmAZCeIDFINcpvFm+7ZLBvMYPlem3cDD2hyc= Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 AC6A86F87A for ; Wed, 28 Apr 2021 18:34:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AC6A86F87A Received: by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1lbmD6-0000Zx-Ri; Wed, 28 Apr 2021 18:34:45 +0300 To: Cyrill Gorcunov References: <20210428102251.552976-1-gorcunov@gmail.com> <20210428102251.552976-3-gorcunov@gmail.com> Message-ID: Date: Wed, 28 Apr 2021 18:34:44 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ECFD8CE5F059401062EF72DCC8B8CDABD8D4F98D4AE0C03D182A05F538085040019AA6DFCAA4D6744441C7252EBE2838A6BA512DF1BE4E7AA00E40D4867B75B2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE705B093C0FC4B30B9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E16D8B060A9A23898638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2CB73136A27E19E3C79AA3F1DA4F297C62AAFC1FEE5B068F7D2E47CDBA5A96583C09775C1D3CA48CFCA5A41EBD8A3A0199FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3ED8438A78DFE0A9E117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF6C47E256C5C9437ABA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B64206C061A092598676E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CB1724D34C644744043847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A559D670F88E8050E564CD1521D87EBD13D184B5C275D03121D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3429538671E6527D32EADF499FE7D0876AFBC15CB10B0C485B1EBA1926C5A79E79DE52EE28EBA29D4C1D7E09C32AA3244C843C738373625F501E7A808C1A5A5E9A39C99C45E8D137E9927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojoCaqxM2e5soeP3bjuyCKFA== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8AE7943C91DA2A839F94D37845796D01FEDBD6F73C78C6341424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 2/2] fiber: fiber_join -- don't crash on misuse X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 28.04.2021 18:21, Cyrill Gorcunov пишет: > On Wed, Apr 28, 2021 at 06:13:30PM +0300, Serge Petrenko wrote: >> Hi! Thanks for the patch! >> Please find 2 comments below. > Thanks! I've force pushed an update. > --- > test/app/fiber.result | 2 +- > test/app/fiber.test.lua | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/test/app/fiber.result b/test/app/fiber.result > index d3a245428..b145302aa 100644 > --- a/test/app/fiber.result > +++ b/test/app/fiber.result > @@ -1154,7 +1154,7 @@ end, 10); > ch1 = fiber.channel(1); > --- > ... > -f = fiber.new(function() while ch1:is_empty() do fiber.sleep(0) end end); > +f = fiber.new(function() ch1:get() end); > --- > ... > f:set_joinable(false); > diff --git a/test/app/fiber.test.lua b/test/app/fiber.test.lua > index 430e4ae96..9f25f7f9c 100644 > --- a/test/app/fiber.test.lua > +++ b/test/app/fiber.test.lua > @@ -488,7 +488,7 @@ end, 10); > > -- gh-6046: make sure non joinable fiber fails > ch1 = fiber.channel(1); > -f = fiber.new(function() while ch1:is_empty() do fiber.sleep(0) end end); > +f = fiber.new(function() ch1:get() end); > f:set_joinable(false); > _, errmsg = pcall(f.join, f); > errmsg; Thanks! LGTM. -- Serge Petrenko