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 A8D1A6F87A; Wed, 28 Apr 2021 18:21:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A8D1A6F87A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619623274; bh=rkkTKP/V2eeS1haDGttUlOFsRr8yRtOa96WoYNtdAFc=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=dxGp+rxBhf/4mZgFaWmVGtpWiOj8EfI1lB2OS5Uy5mY/PK52DTIrtNMhQQb6DiSyL kT7b+mR1EXQ3fdjYH06KxQ2vFEGhCeT0766h+vioXu3QxmrJmJhnF03OKoGf8DLHRy +j0AhPzjI47NY/0ShExOciXO6ZRbqfo2RPljiuvM= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 58C836F87A for ; Wed, 28 Apr 2021 18:21:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 58C836F87A Received: by mail-lf1-f53.google.com with SMTP id n138so99982729lfa.3 for ; Wed, 28 Apr 2021 08:21:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UGbI/aoywlB7KNtiePqef2TXsIdj1FStEBMAG+d9fQ4=; b=rm8EBVK6pyT7e1mKVVfFuxxbvCBzhElMBsujOfW4SH7hKUcXK8UqX89n8Uil0G0g/z y7ncpSBKogbQ3Q+GTXcaYX5nGy5M36c/ASD5ZNsDy06BC34lHkT1hWxfLYV29o7Go4K7 mv/Ep4oHIqAtxUqYRfUjnADwGFQa2esdyt+rG38nFx7fjFUUsvgO2RR+uPQF9+HmSNF7 dXFus2zuLLKDJ9m96NkpRm4fA6UxU59x1V7VVp43e0/uJpEizVp9ibxO7PPRR7If0xtG sqKI7esk8gMwo4YNTjldD/3IBlKm4aHb+NPCllI0df3TRgFnt2w8oWdsGzoM+HY/vCZ5 kS7A== X-Gm-Message-State: AOAM532qN3A3EJCFzZ1qNDRHjf4GU3L1qgVl4nMMsGYCc1Rch7pIKVC9 vzTaW2YHUO/xgEJ/GJ0cVeeesjj8slQ= X-Google-Smtp-Source: ABdhPJzSPJhmS0vcoSO9ohyeNjc5WlkSnj0rFVNr9QXtX/zx7hAoCbozPJkadu6sa2bwcWFmtuh7uw== X-Received: by 2002:a05:6512:139e:: with SMTP id p30mr21325682lfa.489.1619623273226; Wed, 28 Apr 2021 08:21:13 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id o18sm39958lft.265.2021.04.28.08.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 08:21:12 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 7D3D1560107; Wed, 28 Apr 2021 18:21:11 +0300 (MSK) Date: Wed, 28 Apr 2021 18:21:11 +0300 To: Serge Petrenko Message-ID: References: <20210428102251.552976-1-gorcunov@gmail.com> <20210428102251.552976-3-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) 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: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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; -- 2.30.2