chenBright commented on code in PR #2768: URL: https://github.com/apache/brpc/pull/2768#discussion_r1776298424
########## 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: 优化后,free_keytables可能会比较大,需要在bthread_keytable_pool_t内记录下count来避免遍历吗? -- 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