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 BE8DA2FA98 for ; Wed, 5 Jun 2019 08:07:50 -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 ZS5T44RfE-T9 for ; Wed, 5 Jun 2019 08:07:50 -0400 (EDT) Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 7668F2FA32 for ; Wed, 5 Jun 2019 08:07:50 -0400 (EDT) Date: Wed, 5 Jun 2019 09:51:55 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 1/5] test: create isolated ev_loop for swim unit tests Message-ID: <20190605065155.GB28736@atlas> References: <50a84d1ffdd25646894e576ef4ff19195aaf769e.1559433539.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50a84d1ffdd25646894e576ef4ff19195aaf769e.1559433539.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/06/03 14:33]: > --- a/src/lib/swim/swim_ev.c > +++ b/src/lib/swim/swim_ev.c > @@ -55,3 +55,9 @@ swim_ev_timer_stop(struct ev_loop *loop, struct ev_timer *watcher) > { > ev_timer_stop(loop, watcher); > } > + > +struct ev_loop * > +swim_loop(void) The comment explaining why you need a separate loop should be here, not in the tests, since this is the place most people will be looking at and wondering why you need this wrapper at all. You could hack this around with a define, but I think your approach is more clean, so please just add a comment. -- Konstantin Osipov, Moscow, Russia