This is an automated email from the ASF dual-hosted git repository.
wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 2d411176 Fix gflags bthread_concurrency_by_tag validate failed (#2543)
2d411176 is described below
commit 2d411176178c67ac121eca5958f99c2320c9ed28
Author: WAR10CK <[email protected]>
AuthorDate: Mon Feb 26 10:45:35 2024 +0800
Fix gflags bthread_concurrency_by_tag validate failed (#2543)
---
src/bthread/bthread.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bthread/bthread.cpp b/src/bthread/bthread.cpp
index 4d7c8c69..608c1b58 100644
--- a/src/bthread/bthread.cpp
+++ b/src/bthread/bthread.cpp
@@ -391,7 +391,8 @@ int bthread_setconcurrency_by_tag(int num, bthread_tag_t
tag) {
BAIDU_SCOPED_LOCK(bthread::g_task_control_mutex);
auto c = bthread::get_task_control();
if (c == NULL) {
- return EPERM;
+ bthread::FLAGS_bthread_concurrency_by_tag = 0;
+ return 0;
}
auto ngroup = c->concurrency();
auto tag_ngroup = c->concurrency(tag);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]