MJY-HUST commented on PR #2645:
URL: https://github.com/apache/brpc/pull/2645#issuecomment-2120855523

   
改造bthread_keytable_pool_t,其中引入一个类似于Object_pool的成员,但是和Object_pool不同的是,它不是单例。这样就可以和
   
bthread_keytable_pool_t绑定。然后使用bthread_key_create记录KeyInfo时,将index保存到一个bthread_keytable_pool_t的成员中。这样既可以使用基于Object_pool的实现利用thread_local来解决锁竞争的问题;在bthread_keytable_pool_destroy内部也可以通过记录的key的index删除bthread_keytable_pool_t中的所有keytable,避免内存泄漏。


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