From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp60.i.mail.ru (smtp60.i.mail.ru [217.69.128.40]) (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 5D555469719 for ; Wed, 28 Oct 2020 20:14:19 +0300 (MSK) References: <20201028162212.1550-1-sergos@tarantool.org> From: Oleg Babin Message-ID: Date: Wed, 28 Oct 2020 20:14:18 +0300 MIME-Version: 1.0 In-Reply-To: <20201028162212.1550-1-sergos@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [PATCH] lua: handle fiber cancellation for fiber.cond List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sergos@tarantool.org, tarantool-patches@dev.tarantool.org Cc: alexander.turenko@tarantool.org Hi! Thanks for the patch! The main reason I didn't send this patch is inconsistency between Lua and C API. To eliminate such inconsistency [1] was implemented. Unfortunately some test fails and I've failed to find root of the problem. However I still believe that the problem should be solved at "core" level. Anyway, it would be great if some solution will be pushed to upstream. [1] https://github.com/tarantool/tarantool/commit/e7a5120603f362364953315d31aa529342263e0b On 28/10/2020 19:22, sergos@tarantool.org wrote: > From: Sergey Ostanevich > > Before this patch fiber.cond():wait() just returns for cancelled > fiber. In contrast fiber.channel():get() threw "fiber is > canceled" error. > This patch unify behaviour of channels and condvars and also fixes > related net.box module problem - it was impossible to interrupt > net.box call with fiber.cancel because it used fiber.cond under > the hood. Test cases for both bugs are added. > > Closes #4834 > Closes #5013 > > Co-authored-by: Oleg Babin > > @TarantoolBot document > Title: fiber.cond():wait() throws if fiber is cancelled > > Currently fiber.cond():wait() throws an error if waiting fiber is > cancelled like in case with fiber.channel():get(). > --- >