From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 35C192C60C for ; Wed, 1 May 2019 01:09:51 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ACGOSDCTlr-N for ; Wed, 1 May 2019 01:09:51 -0400 (EDT) Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 7114625D4F for ; Wed, 1 May 2019 01:09:50 -0400 (EDT) Date: Wed, 1 May 2019 08:09:47 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 1/5] swim: do not use ev_timer_start Message-ID: <20190501050947.GA1139@atlas> References: <55eb3963102ddf0f83e0358d7041d6e2fabd729c.1556663421.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55eb3963102ddf0f83e0358d7041d6e2fabd729c.1556663421.git.v.shpilevoy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org * Vladislav Shpilevoy [19/05/01 08:07]: > Appeared that libev changes 'ev_timer.at' field to a remaining > time value, and it can't be used as a storage for a timeout. By > the same reason ev_timer_start() can't be used to reuse a timer. > > On the contrary, 'ev_timer.repeat' is not touched by libev, and > ev_timer_again() allows to reuse a timer. > > This patch replaces 'at' with 'repeat' and ev_timer_start() with > ev_timer_again(). > > The bug was not detected by unit tests, because they implement > their own event loop and do not change ev_timer.at. Now they do > to prevent a regression. OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32