zhztheplayer commented on code in PR #9455:
URL: https://github.com/apache/incubator-gluten/pull/9455#discussion_r2063944469


##########
cpp/core/utils/ObjectStore.h:
##########
@@ -70,7 +70,14 @@ class ObjectStore {
     return storeId_;
   }
 
-  ObjectHandle save(std::shared_ptr<void> obj);
+  template <typename T>
+  ObjectHandle save(std::shared_ptr<T> obj) {
+    const std::lock_guard<std::mutex> lock(mtx_);
+    const std::string_view description = typeid(T).name();

Review Comment:
   > May help with better debugging if the size of object is also visible along 
with the name, probably can be avoided if performance can be an issue
   
   Yes performance could be affected if we create a new `std::string` from the 
typeid and size. But we can make a new struct type consisting of `string_view` 
and the size type which is less expensive. Think we can do that separately in 
another PR so feel free to follow up.



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