Fix epoll() performance issue 93/259393/2
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 7 Jun 2021 07:10:00 +0000 (16:10 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 7 Jun 2021 07:13:08 +0000 (16:13 +0900)
vine event-loop runs on independent thread.
So, It is suitable to make a timeout to -1.

https://man7.org/linux/man-pages/man2/epoll_wait.2.html

Change-Id: Id4711937baeebe085ae947abc52436d09862692a

src/vine-event-loop.cpp

index f069db0..b4378c5 100644 (file)
@@ -63,8 +63,7 @@ static void *__vine_event_loop_run(void *arg)
        VINE_LOGD("Run Vine event loop");
 
        struct epoll_event events[MAX_VINE_EPOLL_EVENTS];
-       // TODO: Do we have to use timeout?
-       int timeout = 0;
+       int timeout = -1;
 
        do {
                int n = epoll_wait(__vine_epoll_fd, events,     MAX_VINE_EPOLL_EVENTS, timeout);