chenBright commented on code in PR #2819: URL: https://github.com/apache/brpc/pull/2819#discussion_r1995775619
########## 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: 1. _priority_qs扩容取决于tag吧?现在tag数量在TaskControl::init就确定了,是不是在TaskControl::init中_priority_qs.resize(FLAGS_task_group_ntags),就安全了? 2. 需要像bthread_setconcurrency_by_tag一样,校验tag,保证不越界吗? -- 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