MJY-HUST commented on code in PR #2768:
URL: https://github.com/apache/brpc/pull/2768#discussion_r1777624990


##########
src/bthread/key.cpp:
##########
@@ -467,7 +488,7 @@ int bthread_keytable_pool_getstat(bthread_keytable_pool_t* 
pool,
         LOG(ERROR) << "Param[pool] or Param[stat] is NULL";
         return EINVAL;
     }
-    pthread_rwlock_rdlock(&pool->rwlock);
+    pthread_rwlock_wrlock(&pool->rwlock);
     size_t count = 0;

Review Comment:
   bthread_keytable_pool_t中加了个size_t size;成员



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