[tarantool-patches] Re: [PATCH 1/5] test: create isolated ev_loop for swim unit tests

Konstantin Osipov kostja at tarantool.org
Wed Jun 5 09:51:55 MSK 2019


* 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.

-- 
Konstantin Osipov, Moscow, Russia




More information about the Tarantool-patches mailing list