From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (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 0D526469719 for ; Tue, 17 Mar 2020 22:16:06 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id f13so24277241ljp.0 for ; Tue, 17 Mar 2020 12:16:06 -0700 (PDT) Date: Tue, 17 Mar 2020 22:16:03 +0300 From: Cyrill Gorcunov Message-ID: <20200317191603.GN27301@uranus> References: <0e7fddec984120e36c098cd546ecae4fddc726cd.1577346185.git.lvasiliev@tarantool.org> <20200316112356.GA27301@uranus> <11490847.O9o76ZdvQC@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11490847.O9o76ZdvQC@localhost> Subject: Re: [Tarantool-patches] [PATCH v2] Add some cancellation guard List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Georgy Kirichenko Cc: tarantool-patches@dev.tarantool.org On Tue, Mar 17, 2020 at 09:49:14PM +0300, Georgy Kirichenko wrote: ... > > > + > > > + /* > > > + * The thread should not be canceled while mutex is locked > > > + */ > > > + int old_cancel_state; > > > + tt_pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancel_state); > > > > Don't we need to disable cancel at the entry of this cpipe_destroy? > > Thus trigger_destroy would be guarantee to finish, or it is not > > that important in which moment we disable cancelling? > > > > Other than that the patch looks ok to me, still the overall cbus > > code looks a bit fishy. Do we really need these threads to be > > cancellable? > A relay thread is canceled instead of gracefully exit. Despite relay exits Oh my :( > issue is addressed by my replication-form-memory patch I think this patch is > useful. As I pointed I'm ok with this patch since it address an issue. Still I don't really like the overall design. But this is a different story...