diff options
Diffstat (limited to 'epoll.c')
-rw-r--r-- | epoll.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -51,6 +51,8 @@ #include "event-internal.h" #include "evsignal-internal.h" +#include "event2/thread.h" +#include "evthread-internal.h" #include "log-internal.h" #include "evmap-internal.h" @@ -148,8 +150,12 @@ epoll_dispatch(struct event_base *base, struct timeval *tv) timeout = MAX_EPOLL_TIMEOUT_MSEC; } + EVBASE_RELEASE_LOCK(base, EVTHREAD_WRITE, th_base_lock); + res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout); + EVBASE_ACQUIRE_LOCK(base, EVTHREAD_WRITE, th_base_lock); + if (res == -1) { if (errno != EINTR) { event_warn("epoll_wait"); |