yanglimingcn commented on code in PR #2358: URL: https://github.com/apache/brpc/pull/2358#discussion_r1366521424
########## src/bthread/bthread.cpp: ########## @@ -306,8 +345,14 @@ int bthread_setconcurrency(int num) { } if (num > bthread::FLAGS_bthread_concurrency) { // Create more workers if needed. - bthread::FLAGS_bthread_concurrency += - c->add_workers(num - bthread::FLAGS_bthread_concurrency); + auto tag = bthread::FLAGS_bthread_tag_to_set; + auto add = num - bthread::FLAGS_bthread_concurrency; + if (tag == BTHREAD_TAG_INVALID) { + add = bthread::add_workers_for_each_tag(add); Review Comment: 这块有啥建议怎么搞吗 ########## src/bthread/bthread.cpp: ########## @@ -306,8 +345,14 @@ int bthread_setconcurrency(int num) { } if (num > bthread::FLAGS_bthread_concurrency) { // Create more workers if needed. - bthread::FLAGS_bthread_concurrency += - c->add_workers(num - bthread::FLAGS_bthread_concurrency); + auto tag = bthread::FLAGS_bthread_tag_to_set; + auto add = num - bthread::FLAGS_bthread_concurrency; + if (tag == BTHREAD_TAG_INVALID) { + add = bthread::add_workers_for_each_tag(add); Review Comment: 这块有啥建议怎么搞吗 -- 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