zhengJade commented on code in PR #2819:
URL: https://github.com/apache/brpc/pull/2819#discussion_r1995119831


##########
src/bthread/task_control.h:
##########
@@ -96,6 +97,12 @@ friend bthread_t init_for_pthread_stack_trace();
     void stack_trace(std::ostream& os, bthread_t tid);
     std::string stack_trace(bthread_t tid);
 #endif // BRPC_BTHREAD_TRACER
+    // Only deal once when init epoll bthread.
+    void set_group_epoll_tid(bthread_tag_t tag, bthread_t tid);
+
+    void push_priority_q(bthread_tag_t tag, bthread_t tid) {
+        _priority_qs[tag].push(tid);

Review Comment:
   _priority_qs 目前其实不会扩容,因为 epoll 的 tid 数量在启动的时候就决定了,而且使用的是 
workStealQueue,这个应该是线程安全的吧



-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to