[tarantool-patches] Re: [PATCH 1/5] test: create isolated ev_loop for swim unit tests
Konstantin Osipov
kostja at tarantool.org
Sat Jun 8 17:24:06 MSK 2019
* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/06/06 10:44]:
> Hi! Thanks for the review.
>
> On 05/06/2019 09:51, Konstantin Osipov wrote:
> > * Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [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.
> >
>
> It can't be solved with define, because I need swim.o. I can't
> postpone preprocessor work till linking time. Otherwise we could
> just implement every function in swim_ev.h and swim_transport.h
> as a macros.
>
> The comment is moved and slightly modified.
OK, thanks!
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list