wwbmmm commented on code in PR #2819: URL: https://github.com/apache/brpc/pull/2819#discussion_r2041844626
########## src/bthread/task_control.cpp: ########## @@ -430,6 +435,11 @@ int TaskControl::_destroy_group(TaskGroup* g) { bool TaskControl::steal_task(bthread_t* tid, size_t* seed, size_t offset) { auto tag = tls_task_group->tag(); + + if (_priority_qs[tag].steal(tid)) { Review Comment: 不是说线程安全的问题,我的意思是这个可能影响性能。我不确定,因为实际场景有很多,可能在你的场景里这个性能不是问题,但是在某些场景里可能会有问题,比如event_dispatcher_num很大,有很多epoll thread的情况? ########## src/bthread/task_group.h: ########## @@ -200,6 +200,8 @@ class TaskGroup { return total_ns; } + const bthread_attr_t& get_current_attr() { return _cur_meta->attr; } Review Comment: 可以在func里用g->_cur_meta->attr -- 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