We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee1bff1 commit b2885deCopy full SHA for b2885de
1 file changed
src/core/connection.cpp
@@ -534,17 +534,18 @@ void connection_event_loop(void (*connection_handler)(scache_connection* connect
534
pthread_t tid[2];
535
struct epoll_event ev;
536
uint64_t u;
537
+ connection_thread_arg thread_arg[2];
538
539
//Init Mutex
540
if (pthread_mutex_init(&cq_lock, NULL) != 0)
541
{
542
PFATAL("mutex init failed");
543
}
544
- //Init Acceptor thread data
545
- connection_thread_arg thread_arg[2];
+ // Prepare a non blocking eventfd for thread communication
546
efd = eventfd(0, EFD_NONBLOCK);
547
548
+ //Init Acceptor thread data
549
thread_arg[0].type = cache_listener;
550
thread_arg[1].type = mon_listener;
551
thread_arg[0].eventfd = thread_arg[1].eventfd = efd;
0 commit comments