From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (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 E5956445320 for ; Thu, 30 Jul 2020 11:47:48 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id r19so27972037ljn.12 for ; Thu, 30 Jul 2020 01:47:48 -0700 (PDT) Date: Thu, 30 Jul 2020 11:47:45 +0300 From: Cyrill Gorcunov Message-ID: <20200730084745.GE3264@grain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 1/1] txn_limbo: reduce fiber_set_cancellable() calls List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On Thu, Jul 30, 2020 at 01:41:20AM +0200, Vladislav Shpilevoy wrote: > The calls were added before and after each cond_wait() so as the > fiber couldn't be woken up externally. For example, from Lua. > > But it is not necessary to flip the flag on each wait() call. It > is enough to make it 2 times: forbid cancellation in the beginning > of txn_limbo_wait_complete(), and return the old value back in the > end. > --- Ack