yanglimingcn commented on code in PR #3078:
URL: https://github.com/apache/brpc/pull/3078#discussion_r2311797798
##########
src/brpc/event_dispatcher_kqueue.cpp:
##########
@@ -69,11 +69,15 @@ int EventDispatcher::Start(const bthread_attr_t*
thread_attr) {
// Set _thread_attr before creating kqueue thread to make sure
// everyting seems sane to the thread.
- _thread_attr = (thread_attr ? *thread_attr : BTHREAD_ATTR_NORMAL);
+ if (thread_attr) {
+ _thread_attr = *thread_attr;
+ }
//_thread_attr is used in StartInputEvent(), assign flag NEVER_QUIT to it
will cause new bthread
// that created by kevent() never to quit.
- bthread_attr_t kqueue_thread_attr = _thread_attr | BTHREAD_NEVER_QUIT;
+ // Only event dispatcher thread has flag BTHREAD_GLOBAL_PRIORITY.
+ bthread_attr_t kqueue_thread_attr =
Review Comment:
epoll默认是走priority_queue吗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]