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


##########
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:
   @zhengJade 
我理解,原来的steal在遍历worker的时候起始点和步长不一样,遍历的worker会错开。但是现在变成了steal同一个,tag内的竞争变激烈了,那么这里的M(g->_rq.steal(tid)
 单次时间)也会变大了。



-- 
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