wwbmmm commented on code in PR #3096:
URL: https://github.com/apache/brpc/pull/3096#discussion_r2424265580


##########
src/butil/resource_pool_inl.h:
##########
@@ -307,6 +308,28 @@ class BAIDU_CACHELINE_ALIGNMENT ResourcePool {
         const size_t n = ResourcePoolFreeChunkMaxItem<T>::value();
         return n < FREE_CHUNK_NITEM ? n : FREE_CHUNK_NITEM;
     }
+
+    std::list<T*> list_resources() const {

Review Comment:
   std::list use linked list and will do a lot of malloc/free calls. I am not 
sure whether std::list is faster than std::vector here. Maybe you can do some 
performance testing.
   This is a small issue. I think both std::list and std::vector are acceptable.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to