MCPcopy Create free account
hub / github.com/apache/brpc / stop_and_join_epoll_threads

Function stop_and_join_epoll_threads

src/bthread/fd.cpp:423–432  ·  view source on GitHub ↗

TODO(zhujiashun): change name

Source from the content-addressed store, hash-verified

421
422//TODO(zhujiashun): change name
423int stop_and_join_epoll_threads() {
424 // Returns -1 if any epoll thread failed to stop.
425 int rc = 0;
426 for (size_t i = 0; i < BTHREAD_EPOLL_THREAD_NUM; ++i) {
427 if (epoll_thread[i].stop_and_join() < 0) {
428 rc = -1;
429 }
430 }
431 return rc;
432}
433
434// For pthreads.
435int pthread_fd_wait(int fd, unsigned events,

Callers 2

TESTFunction · 0.85
stop_and_joinMethod · 0.85

Calls 1

stop_and_joinMethod · 0.45

Tested by 1

TESTFunction · 0.68